Hello!
In one of my apps I have a QTableView implemented with a QTableModelView as model. I have the QVariant headerData(...) method reimplemented in my model's definition and it's supposed to retrieve a junction of two QStrings: one containing a given physical quantity and the other, inside "[ ]", its unity, such as in the image below:
Screenshot from 2014-07-22 15:13:48.png
The image shows the result of what I have implemented by now. As you can see, what happens is that the name of some physical quantities are bigger then others (or the name of a pq's unity is bigger then others), leading to the situation you see on the picture. But what I would like to have implemented is a formatted pattern where the pq's unity (with the "[ ]") is always at the far right of the header 'label' while only the PQ's name is at the far left.
How can I implement this?
Thanks,
Momergil




Reply With Quote

Bookmarks