summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dist/changes-5.2.05
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp10
2 files changed, 14 insertions, 1 deletions
diff --git a/dist/changes-5.2.0 b/dist/changes-5.2.0
index 287cda4821..e055e27a0e 100644
--- a/dist/changes-5.2.0
+++ b/dist/changes-5.2.0
@@ -35,6 +35,11 @@ QtWidgets
- QFileDialog::setDefaultSuffix() removes leading dot characters.
+- [QTBUG-34132] QFileDialog does not instantiate widgets if a native dialog
+ will be used instead. Therefore some accessors which previously returned
+ unused objects will now return null. As before, you can set the
+ DontUseNativeDialog option to ensure that widgets will be created and used instead.
+
- QSizePolicy got a retainSizeWhenHidden attribute.
- [QTBUG-31602] QSpinBox size calculation will now be fixed when stylesheets are
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index 383e3ab3f4..22d467661e 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -184,6 +184,13 @@ Q_WIDGETS_EXPORT _qt_filedialog_save_file_url_hook qt_filedialog_save_file_url_h
The \l{dialogs/standarddialogs}{Standard Dialogs} example shows
how to use QFileDialog as well as other built-in Qt dialogs.
+ By default, a platform-native file dialog will be used if the platform has
+ one. In that case, the widgets which would otherwise be used to construct the
+ dialog will not be instantiated, so related accessors such as layout() and
+ itemDelegate() will return null. You can set the \l DontUseNativeDialog option to
+ ensure that the widget-based implementation will be used instead of the
+ native dialog.
+
\sa QDir, QFileInfo, QFile, QColorDialog, QFontDialog, {Standard Dialogs Example},
{Application Example}
*/
@@ -243,7 +250,8 @@ Q_WIDGETS_EXPORT _qt_filedialog_save_file_url_hook qt_filedialog_save_file_url_h
\value DontUseNativeDialog Don't use the native file dialog. By
default, the native file dialog is used unless you use a subclass
- of QFileDialog that contains the Q_OBJECT macro.
+ of QFileDialog that contains the Q_OBJECT macro, or the platform
+ does not have a native dialog of the type that you require.
\value ReadOnly Indicates that the model is readonly.