Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.6.1, 6.7.0 Beta2
-
-
c1921abf6 (dev), 6b0cb9847 (6.7), 19ba32653 (6.6), 17a59b797 (tqtc/lts-6.5), 3ca0288aa (dev), 800d7138a (6.8)
Description
After adding some items to a QTreeWidget and loading a custom stylesheet, the interactive resize of the columns does not work.
Default Stylesheet:
Custom stylesheet:
The first column is not resizing properly.
The header is setup this way:
header = self.header()
header.setStretchLastSection(False)
header.setSectionResizeMode(0, QtWidgets.QHeaderView.ResizeMode.Interactive)
header.setSectionResizeMode(1, QtWidgets.QHeaderView.ResizeMode.ResizeToContents)
header.setSectionResizeMode(2, QtWidgets.QHeaderView.ResizeMode.ResizeToContents)
And the resizing is called like this:
self.resizeColumnToContents(header.logicalIndex(0))
Attached is a pyside example to reproduce the issue.
We believe the issue was introduced with this commit:
https://github.com/qt/qtbase/commit/4253b2b6e70ce6f2a2b5b18d9a5a230e1aa01b5e
Attachments
Issue Links
- is duplicated by
-
QTBUG-120699 QHeaderView in QTableView doesn't restore geometry
- Closed
-
QTBUG-122416 QHeaderView::resizeSection is overwritten by QHeaderView::event(StyleChange)
- Closed
-
QTBUG-123807 QTreeWidget::setColumnWidth does not applies in 6.6.x
- Closed
- relates to
-
QTBUG-123154 Applying stylesheet resets column and row size configurations on Qt 6.5.4
- Closed
- resulted from
-
QTBUG-116013 QHeaderView::resetDefaultSectionSize doesn't invalidate cached size hints / update view
- Closed