I have a QTableWidget and I want to change the size of the horizontalHeaders. But there is only a function to set the width. But how do you change the height? Hope someone can help me.
Asked
Active
Viewed 5,652 times
1 Answers
4
Looking at the docs (I don't have Qt on my current system), you can get the QTableWidgetItem
from horizontalHeaderItem
and then call the setSizeHint(QSize)
function to give it a size which contains a height property.

CookieOfFortune
- 13,836
- 8
- 42
- 58
-
Thank you very much, don't know how I didn't see that. – user427305 Jun 17 '11 at 20:39
-
I forgot to say, that I needed to set horizontalHeader().setResizeMode(QHeaderView.ResizeToContents) too – user427305 Jun 17 '11 at 20:53