From 0a19a964e09e31016b39ee2d65f6220b01c49dcb Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 3 May 2013 11:55:22 -0700 Subject: Temporarily expand all dives so the automatic width calculation works Suggested-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index bd202b24f..aac829ef1 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -314,6 +314,9 @@ void MainWindow::readSettings() settings.endGroup(); settings.beginGroup("ListWidget"); + /* if no width are set, use the calculated width for each column; + * for that to work we need to temporarily expand all rows */ + ui->ListWidget->expandAll(); for (i = TreeItemDT::NR; i < TreeItemDT::COLUMNS; i++) { QVariant width = settings.value(QString("colwidth%1").arg(i)); if (width.isValid()) @@ -321,6 +324,7 @@ void MainWindow::readSettings() else ui->ListWidget->resizeColumnToContents(i); } + ui->ListWidget->collapseAll(); settings.endGroup(); } -- cgit v1.2.3-70-g09d2