Set a minimum section size in curve editors treeview

This fixes a bug on some systems where resizeSection did not work
as expected making the sections for the icons too wide and therefore
the item names unreadable for the default treeview width.

Fixes: QDS-10131
Change-Id: I10242a7f3f96c580b3256f7ca420466173581e35
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Knud Dollereder
2023-06-22 11:23:28 +02:00
parent dfe7789506
commit 802d1227ea

View File

@@ -37,6 +37,8 @@ TreeView::TreeView(CurveEditorModel *model, QWidget *parent)
setStyle(model->style());
header()->setMinimumSectionSize(20);
header()->setSectionResizeMode(0, QHeaderView::Stretch);
header()->setSectionResizeMode(1, QHeaderView::Fixed);
header()->setSectionResizeMode(2, QHeaderView::Fixed);