How to adjust the a QHeaderView's width
I used a QTableWidget in my program, there was also a vertical header, after starting the program's run, when i clicked the vertical header, i want to add a QtableWidgetItem to the vertical header using "serVerticalHeaderItem( logicalIndex, pItem)", but the width of the vertical header doesn't adjust to display the whole icon image, how can i make this working better?
code:
Code:
setVerticalHeaderItem( argLogicalIndex, pItem );
ps: i tryed resizeSecton(), but it doesn't work!
resizeSection works correctly for the horizontalHeader(), but it resizes the height instead of the width in the verticalHeader()
Re: How to adjust the a QHeaderView's width
You could try verticalHeaderItem()->setSizeHint(pixmapSize);
Re: How to adjust the a QHeaderView's width
Thank you, it does work^_^