From a91edfef89b9323a1be8da99bb69dd985cb99379 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 8 Jul 2020 13:34:38 +0200 Subject: [PATCH] [netinstall] auto-resize the columns - previously, the first column (name) was sized to show the names **that were visible at startup**, which fails when there are long names hidden in groups that are not expanded immediately. - change the columns to resize according to the contents; this makes the descriptions jump to the right as the name column gets wider. FIXES #1448 --- src/modules/netinstall/NetInstallPage.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/netinstall/NetInstallPage.cpp b/src/modules/netinstall/NetInstallPage.cpp index 80689e6d2..0d8dc5960 100644 --- a/src/modules/netinstall/NetInstallPage.cpp +++ b/src/modules/netinstall/NetInstallPage.cpp @@ -40,6 +40,7 @@ NetInstallPage::NetInstallPage( Config* c, QWidget* parent ) , ui( new Ui::Page_NetInst ) { ui->setupUi( this ); + ui->groupswidget->header()->setSectionResizeMode( QHeaderView::ResizeToContents ); ui->groupswidget->setModel( c->model() ); connect( c, &Config::statusChanged, this, &NetInstallPage::setStatus ); connect( c, &Config::statusReady, this, &NetInstallPage::expandGroups ); @@ -88,8 +89,6 @@ NetInstallPage::expandGroups() ui->groupswidget->setExpanded( index, true ); } } - // Make sure all the group names are visible - ui->groupswidget->resizeColumnToContents(0); } void