Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[Solved] QTextDocument with < and > characters
Endless77 last edited by Endless77
I'm using QTextDocument to set the appearance of fields. I use:
When mytext is composed of numerals and normal characters, everything is fine, but in one case I'd like to display the string "<80" in the field. This doesn't work (I would assume because the parser sees the < character and figures it's a new section). How can I include the < or > characters in an html string?
< and > are special characters in html. To display them literally you can use entities:
<80will result in
For a list of possible entities you can scout the web, e.g. here.