Home > OS >  How to get a superscript in QTableWidget header?
How to get a superscript in QTableWidget header?

Time:12-20

I found out from enter image description here

I try other HTML tags which work in QLabel but none of them work for QTableWidgetItem

CodePudding user response:

This is the solution for having superscript in the QTableWidget header :

We should use only enter image description here

Because it may be difficult to know these numbers, I used an enter image description here

I wrote the content I wanted to see in the header here and after that I use Ctrl C in Table's header UI. then Qt will generate Unicode forms in "ui_mainwindow.h" file.

As I mentioned characters should be Unicode so for example I test typing my text in LibreOffice and Ctrl C from there but it didn't understand and show x2 in the header.

  • Related