summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-03-21 10:45:23 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-03-23 03:16:53 +0000
commit2ee01127c979ef0a66d70f36d6c0f886ec7be859 (patch)
treefdbce2fe2a46a3a34a8c68e65b80fca6bf2fcda5 /src/widgets/dialogs
parentdde2bfed811476b6e9af21335f94aa0f3fe57358 (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. Task-number: QTBUG-59805 Change-Id: I3a1cea8f11a62c0927a9ba00159a118e2b078956 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 49a5512f0b68cf0f3da3c5ba1b6f9cce4e358bb0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/widgets/dialogs')
-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 a3d8af8961..52192b926a 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -161,9 +161,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},
{Application Example}
@@ -2183,7 +2184,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
@@ -2294,7 +2296,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
@@ -2659,6 +2662,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