Quote Originally Posted by ChrisW67 View Post
Have you tried simply putting a tab character between the label and unit, i.e. " label\t[unit]", to see what the default rendering does with that?
Yes: it puts a space instead of a tab \o/ (that happens both when using the model's headerData() reimplementation as well as when reimplementing QHeaderView's paintSection().

Quote Originally Posted by ChrisW67 View Post
Another approach. It would be quite easy if the header font was fixed width. Then you could make each string, say, 20 chars and construct with the appropriate number of spaces in between label and unit.
Yeah, I did think about a similar solution, but it was quite inefficient... The only difference is that the header should not be size fixed (the result from using a size-fixed font plus a fixed number of letters on each string), so the calculation was based on largest of strings using a QLabel::width() comparison after calling adjustSize(). So as you can see, quite inefficient and it was abandoned =T

Quote Originally Posted by ChrisW67 View Post
Another approach. Do not display the unit in the label but as a tool tip on the header view cell.
No way: its part of the software specification that the header should be so, and it's for a touchscreen embedded Linux device so tool tips are not welcome