Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.9.2
-
None
-
Kubuntu 16.04 amd64
-
b4f4c384d9ee7cf93cc3db289a7d4275ac10a618
Description
If I limit the column width with the QHeaderView::setMaximumSectionSize(), it doesn't work for the double-click on a section separator.
Test program
#include <QtWidgets> int main(int argc, char *argv[]) { QApplication app(argc, argv); QStandardItemModel model; QWidget window; QTreeView *tree = new QTreeView(&window); model.setColumnCount(2); model.setItem(0, 0, new QStandardItem("test 1")); model.setItem(0, 1, new QStandardItem("test 2")); model.setItem(1, 0, new QStandardItem("This is a very very long text that cannot fit into the window")); model.setItem(1, 1, new QStandardItem("test 3")); QHBoxLayout *layout = new QHBoxLayout; layout->addWidget(tree); window.setLayout(layout); tree->header()->setMaximumSectionSize(150); tree->setModel(&model); window.show(); return app.exec(); }
Attachments
For Gerrit Dashboard: QTBUG-64036 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
209709,5 | QHeaderView: Honor maximumSectionSize property during resizeSections() | 5.9 | qt/qtbase | Status: MERGED | +2 | 0 |