summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qfiledialog_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/dialogs/qfiledialog_mac.mm')
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm
index 6c1d7f6..a233d4f 100644
--- a/src/gui/dialogs/qfiledialog_mac.mm
+++ b/src/gui/dialogs/qfiledialog_mac.mm
@@ -726,6 +726,14 @@ bool QFileDialogPrivate::setVisible_sys(bool visible)
if (!visible == q->isHidden())
return false;
+ if (q->windowFlags() & Qt::WindowStaysOnTopHint) {
+ // The native file dialog tries all it can to stay
+ // on the NSModalPanel level. And it might also show
+ // its own "create directory" dialog that we cannot control.
+ // So we need to use the non-native version in this case...
+ return false;
+ }
+
#ifndef QT_MAC_USE_COCOA
return visible ? showCarbonNavServicesDialog() : hideCarbonNavServicesDialog();
#else