Doc: Mention AA_DontUseNativeDialogs in QFileDialog

Pick-to: 6.6 6.5
Task-number: QTBUG-119551
Change-Id: I54f7e8f4b855b15d22b2180095cbf454b31412c3
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit d3117e97014af029b2c117daef9695b87103ab25)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Kai Köhne 2024-01-01 17:47:37 +01:00
parent 206000166f
commit 36d14d76fd

View File

@ -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.