diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index 0ba3ea40e0..6065ad015e 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -510,7 +510,7 @@ bool QFileDialog::restoreState(const QByteArray &state) if (!d->qFileDialogUi->splitter->restoreState(d->splitterState)) return false; QList list = d->qFileDialogUi->splitter->sizes(); - if (list.count() >= 2 && list.at(0) == 0 && list.at(1) == 0) { + 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); diff --git a/src/widgets/dialogs/qfiledialog.ui b/src/widgets/dialogs/qfiledialog.ui index 89adaf530e..7f6e59c908 100644 --- a/src/widgets/dialogs/qfiledialog.ui +++ b/src/widgets/dialogs/qfiledialog.ui @@ -179,6 +179,9 @@ Qt::Horizontal + + false + Sidebar diff --git a/src/widgets/dialogs/qfiledialog_embedded.ui b/src/widgets/dialogs/qfiledialog_embedded.ui index 69fc3255a1..4cdc620437 100644 --- a/src/widgets/dialogs/qfiledialog_embedded.ui +++ b/src/widgets/dialogs/qfiledialog_embedded.ui @@ -121,6 +121,9 @@ Qt::Horizontal + + false +