3 import
Qt.labs.platform 1.0 as Labs
35 property var msgConfig
49 property MessageResult msgResult
63 property var mimeTypes
68 title: msgConfig.
title 69 modality:
Qt.WindowModal
70 folder: msgConfig.defaultValue
72 if(msgConfig.subType ===
"open")
73 return Labs.FileDialog.OpenFile;
74 else if(msgConfig.subType ===
"files")
75 return Labs.FileDialog.OpenFiles;
76 else if(msgConfig.subType ===
"save")
77 return Labs.FileDialog.SaveFile;
79 return Labs.FileDialog.OpenFile;
84 Component.onCompleted: {
86 msgResult.setCloseTarget(_fileDialog,
"reject()");
91 if(msgConfig.subType ===
"files")
92 msgResult.result = _fileDialog.files;
94 msgResult.result = _fileDialog.file;
95 msgResult.complete(MessageConfig.Ok);
103 msgResult.complete(MessageConfig.Cancel);
QString title
The activity title/description of the file chooser.
The QML import for the QtMvvmCore QML module.
static Q_INVOKABLE QStringList mimeTypeFilters(const QStringList &mimeTypes) const
Converts a list of mimetypes into a list of extension filters, for a file dialog. ...
The QML import for the QtMvvmQuick QML module.
A QML singleton to access common presenter methods globally.
A file dialog implementation based on the labs file dialog.