Matthew Hoggan
Matthew Hoggan

Reputation: 7604

Qt QTextEdit Qt4.2 Valid HTML String

I am trying to generate the correct HTML to render to a QTextEdit Using Qt 4.2 on RHEL 5.3. So far my algorithm generates the following html. I am not an expert web developer, but to me this string seems valid.

319:14:27:22:   <font color="rgb(255,0,0)" bgcolor="rgb(255,0,0)">Message</font><br>

What needs to change to get the colours to render. Currently it just renders as black text on a white background.

Upvotes: 0

Views: 335

Answers (1)

Leiaz
Leiaz

Reputation: 2917

QTextEdit accepts a subset of HTML detailed here in the doc.

For font color attribute, it must be "Qt color names or #RRGGBB".

Upvotes: 1

Related Questions