summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qfiledialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/dialogs/qfiledialog.cpp')
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index e375a957de..4cda5f34ad 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -2950,10 +2950,10 @@ void QFileDialogPrivate::createWidgets()
qFileDialogUi->treeView->setModel(model);
QHeaderView *treeHeader = qFileDialogUi->treeView->header();
QFontMetrics fm(q->font());
- treeHeader->resizeSection(0, fm.width(QLatin1String("wwwwwwwwwwwwwwwwwwwwwwwwww")));
- treeHeader->resizeSection(1, fm.width(QLatin1String("128.88 GB")));
- treeHeader->resizeSection(2, fm.width(QLatin1String("mp3Folder")));
- treeHeader->resizeSection(3, fm.width(QLatin1String("10/29/81 02:02PM")));
+ treeHeader->resizeSection(0, fm.horizontalAdvance(QLatin1String("wwwwwwwwwwwwwwwwwwwwwwwwww")));
+ treeHeader->resizeSection(1, fm.horizontalAdvance(QLatin1String("128.88 GB")));
+ treeHeader->resizeSection(2, fm.horizontalAdvance(QLatin1String("mp3Folder")));
+ treeHeader->resizeSection(3, fm.horizontalAdvance(QLatin1String("10/29/81 02:02PM")));
treeHeader->setContextMenuPolicy(Qt::ActionsContextMenu);
QActionGroup *showActionGroup = new QActionGroup(q);