summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qfiledialog.cpp
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2024-01-01 17:47:37 +0100
committerKai Köhne <kai.koehne@qt.io>2024-02-19 13:20:08 +0100
commitd3117e97014af029b2c117daef9695b87103ab25 (patch)
tree78d5de50b2330acfcbbdec287ee2bdc7e4d012f2 /src/widgets/dialogs/qfiledialog.cpp
parent8aceccc7eb075cef442dfe725137068d90e40940 (diff)
Doc: Mention AA_DontUseNativeDialogs in QFileDialog
Pick-to: 6.5 6.6 6.7 Task-number: QTBUG-119551 Change-Id: I54f7e8f4b855b15d22b2180095cbf454b31412c3 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/widgets/dialogs/qfiledialog.cpp')
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index a83251929e..13e1df8a96 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -138,8 +138,9 @@ Q_GLOBAL_STATIC(QUrl, lastVisitedDir)
dialog are not instantiated, so related accessors such as layout() and
itemDelegate() return null. Also, not all platforms show file dialogs
with a title bar, so be aware that the caption text might not be visible to
- the user. You can set the \l DontUseNativeDialog option to ensure that the
- widget-based implementation is used instead of the native dialog.
+ the user. You can set the \l DontUseNativeDialog option or set the
+ \l{Qt::AA_DontUseNativeDialogs}{AA_DontUseNativeDialogs} application attribute
+ to ensure that the widget-based implementation is used instead of the native dialog.
\sa QDir, QFileInfo, QFile, QColorDialog, QFontDialog, {Standard Dialogs Example}
*/
@@ -202,7 +203,8 @@ Q_GLOBAL_STATIC(QUrl, lastVisitedDir)
\value DontUseNativeDialog Don't use a platform-native file dialog,
but the widget-based one provided by Qt.\br
By default, a native file dialog is shown unless you use a subclass
- of QFileDialog that contains the Q_OBJECT macro or the platform
+ of QFileDialog that contains the Q_OBJECT macro, the global
+ \l{Qt::}{AA_DontUseNativeDialogs} application attribute is set, or the platform
does not have a native dialog of the type that you require.\br
For the option to be effective, you must set it before changing
other properties of the dialog, or showing the dialog.
@@ -2538,7 +2540,8 @@ QUrl QFileDialog::getSaveFileUrl(QWidget *parent,
On Windows and \macos, this static function uses the
native file dialog and not a QFileDialog. However, the native Windows file
dialog does not support displaying files in the directory chooser. You need
- to pass \l{QFileDialog::}{DontUseNativeDialog} to display files using a
+ to pass the \l{QFileDialog::}{DontUseNativeDialog} option, or set the global
+ \\l{Qt::}{AA_DontUseNativeDialogs} application attribute to display files using a
QFileDialog.
Note that the \macos native file dialog does not show a title bar.