Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.3
-
None
-
Windows and Linux
-
d8b45a360f99149c42863067e3b40c619a892cd2
Description
Within the standard QFileDialog there is a splitter which allows you to resize ListView and TreeView. When one of them becomes invisible (resized to 0) it is very difficult to see this has happened.
This situation is saved to QSettings and also restored. Please look at the attached picture and find the treeView
I think the QFileDialog restoreState method contains code to prevent one of the widgets to have size 0 at line 448 of QFileDialog.cpp
QList<int> list = d->qFileDialogUi->splitter->sizes(); if (list.count() >= 2 && list.at(0) == 0 && list.at(1) == 0) { for (int i = 0; i < list.count(); ++i) list[i] = d->qFileDialogUi->splitter->widget(i)->sizeHint().width(); d->qFileDialogUi->splitter->setSizes(list); }
Should be
if (list.count() >= 2 && (list.at(0) == 0 || list.at(1) == 0) ){
because only one of the 2 widgets in the splitter has size 0 and not both of them