Solved Help with HTML Text in QML
-
Hello. I have an object like this:
Text { text: '<font style="font-weight:900;">Text Test</font>' color: "black" }
I want to set
font-weight
value as in the docs: http://doc.qt.io/qt-5/richtext-html-subset.html
I need to usefont-weight
because I want slightly thinner font than a font I get by using<b></b>
tags. -
The text format can be specified by hand if the auto detection doesn't give desired results: http://doc.qt.io/qt-5/qml-qtquick-text.html#textFormat-prop
-
Thank you, @jpnurmi!
SettingtextFormat: Text.RichText
worked for me.