I am trying to create superscript 2 to show that something is quadratic for the unit label that appears after the field that the user supplies in my dialog box. I am using Qt Creator v2.0.1 for Windows. QLabel has a text field and a textFormat field. I tried to solve this problem by setting combofox textFormat to RichText, and then set the textFormat field as follows: "μm {\ super 2}", however when viewing my dialog, the text is taken literally and not like RichText, and therefore there is no superscript 2 but instead, '{super 2}' with the backslash removed. I also tried to pry backslash with '{\ super 2}', but after that, after looking at the dialog box, I should literally "{\ super 2}".
How can I specify superscript in Qt Creator so that my preview in the dialog shows superscript 2?
Here is how I want to see it: μm 2
source share