Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
6.6.1
-
None
Description
Hi,
Since Qt 6.6.1, setting a column width on a QTableView (using horizontalHeader() resizeSection) does not work. To make the column width stick, one need to call QHeaderView::setDefaultSectionSize to set d->customDefaultSectionSize to true.
This is because in QHeaderView::event handler, when receiving QEvent.StyleChange event, the column width is reset to the default width from the style, unless a default section size has been set before.
Commit reference:
Attachments
Issue Links
- duplicates
-
QTBUG-122109 QTreeWidget's columns do not seem to resize properly after upgrading from Qt6.5.3 to Qt6.1.1
- Closed