I am trying to set a font colour for Html text in a created QTextBrowser
. I've used basic Html Commands to set paragraphs, change font size etc. but when it comes to setting font colour, it doesn't seem to work?
The code that I used is shown below:
self.key = QtGui.QTextBrowser(self)
self.key.setHtml(
"""<h1>Key</h1>
<body>
<font colour="red">
GREEN = Overall Progress is 80% or above
YELLOW = Overall Progress between 65%-79%
Orange = Overall Progress is 64% or below
</font>
</body>"""
)
It makes Key
a header (Bold and Enlarged) via the use of <h1>
but using colour tags
or evem colour codes
(e.g.#00ff00
) don't seem to work