From 802d1227ea4db310e2f6a8c7a704c67887a13873 Mon Sep 17 00:00:00 2001 From: Knud Dollereder Date: Thu, 22 Jun 2023 11:23:28 +0200 Subject: [PATCH] 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 --- .../qmldesigner/components/curveeditor/detail/treeview.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/qmldesigner/components/curveeditor/detail/treeview.cpp b/src/plugins/qmldesigner/components/curveeditor/detail/treeview.cpp index c8b99d61c8d..82d8e2dd99d 100644 --- a/src/plugins/qmldesigner/components/curveeditor/detail/treeview.cpp +++ b/src/plugins/qmldesigner/components/curveeditor/detail/treeview.cpp @@ -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);