Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.2.3
-
None
-
Qt 6.2.3, Qt Creator 6.0.2
iOS Simulator, iOS 15.2 (iPad 7th generation)
XCode 13.2.1
Description
It looks like FileDialog doesn't work on iOS when fileMode is set to FileDialog.SaveFile
Looking in the code, it looks like the native dialog (qiosfiledialog.mm) will just return false without opening any dialog if set to save mode (acceptOpen == false):
bool QIOSFileDialog::show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) { Q_UNUSED(windowFlags); Q_UNUSED(windowModality); bool acceptOpen = options()->acceptMode() == QFileDialogOptions::AcceptOpen; QString directory = options()->initialDirectory().toLocalFile(); if (acceptOpen) { if (directory.startsWith(QLatin1String("assets-library:"))) return showImagePickerDialog(parent); else return showNativeDocumentPickerDialog(parent); } return false; }
I don't know if this is due to iOS not having a native save dialog (it must have something?) or if it's just a bug. The Qt documentation states "Qt Quick Dialogs uses a Qt Quick implementation as a fallback on platforms that do not have a native implementation available.", so it should display some dialog instead of silently failing.
Attachments
Issue Links
- relates to
-
QTBUG-108455 FileDialog.SaveFile mode is unusable
-
- Reported
-