summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qfiledialog.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-03-21 10:45:23 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-03-23 03:31:45 +0100
commit49a5512f0b68cf0f3da3c5ba1b6f9cce4e358bb0 (patch)
tree17d1202749a5c26cb963fccb484c067ff4547ee6 /src/widgets/dialogs/qfiledialog.cpp
parent3fbe201d21032a505afc45ce3746ac499e7b462e (diff)
Document that native file dialogs might not show a title
Native dialogs on macOS haven't shown a title bar since macOS 10.11. The caption string passed in might not be visible to the end user, which can be problematic for certain applications that use the title text to provide context to the user. Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-59805 Change-Id: I3a1cea8f11a62c0927a9ba00159a118e2b078956 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/widgets/dialogs/qfiledialog.cpp')
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index 4e460026a4..f8378c0c08 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -167,9 +167,10 @@ Q_GLOBAL_STATIC(QUrl, lastVisitedDir)
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.
+ itemDelegate() will 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 will be used instead of the native dialog.
\sa QDir, QFileInfo, QFile, QColorDialog, QFontDialog, {Standard Dialogs Example},
{Qt Widgets - Application Example}
@@ -2082,7 +2083,8 @@ QString QFileDialog::labelText(DialogLabel label) const
then a default caption will be used.
On Windows, and \macos, this static function will use the
- native file dialog and not a QFileDialog.
+ native file dialog and not a QFileDialog. Note that the \macos native file
+ dialog does not show a title bar.
On Windows the dialog will spin a blocking modal event loop that will not
dispatch any QTimers, and if \a parent is not \nullptr then it will position
@@ -2193,7 +2195,8 @@ QUrl QFileDialog::getOpenFileUrl(QWidget *parent,
then a default caption will be used.
On Windows, and \macos, this static function will use the
- native file dialog and not a QFileDialog.
+ native file dialog and not a QFileDialog. Note that the \macos native file
+ dialog does not show a title bar.
On Windows the dialog will spin a blocking modal event loop that will not
dispatch any QTimers, and if \a parent is not \nullptr then it will position
@@ -2558,6 +2561,8 @@ QUrl QFileDialog::getSaveFileUrl(QWidget *parent,
to pass \l{QFileDialog::}{DontUseNativeDialog} to display files using a
QFileDialog.
+ Note that the \macos native file dialog does not show a title bar.
+
On Unix/X11, the normal behavior of the file dialog is to resolve and
follow symlinks. For example, if \c{/usr/tmp} is a symlink to \c{/var/tmp},
the file dialog will change to \c{/var/tmp} after entering \c{/usr/tmp}. If