QML: superscript/subscript text
The problem is that QML totally ignores <sub> and <sup> html tags, that are actually mentioned in official "Supported HTML Subset":http://qt-project.org/doc/qt-4.7/richtext-html-subset.html#id-ed613049-e204-44d2-816d-74bb4b42ea92.
So the following code will display regular "xy":
Is there any another possible way to display subscript/superscript text?
Using 5.2.1 on Linux, <sup> and <sub> change the text size if textFormat is Text.RichText, but they're not elevated or depressed as I would have expected.
https://bugreports.qt-project.org/browse/QTBUG-24621 and https://bugreports.qt-project.org/browse/QTBUG-32948 acknowledge the problem.
One workaround is to draw super- or subscripted text as a child or sibling Text with a smaller font.pixelSize and anchored to the normal text's top or bottom.
Thanks for reply.
According to given reports, bug is years old... Very sad that developers turn a blind eye to this kind of things.
They don't but Qt is big and the developer teams have only so many members. However, you can help getting the bug fixed by voting for it and make it known that it's still an issue in the latest version.