I am a student programmer and I am using Qt to build a GUI interface for work. I have a QTreeWidget
that has a total of 8 Columns. The input that needs to be en
The problem for me was that StretchLastSection
was set to true and if this value is set to true, this property will override the resize mode set on the last section in the header.
Solution:
_treeWidget = new UIWidgetSceneTree();
_treeWidget->header()->setStretchLastSection(false);
_treeWidget->header()->setSectionResizeMode(QHeaderView::ResizeToContents);