3 import
Qt.labs.platform 1.0 as Labs
34 property var msgConfig
48 property MessageResult msgResult
62 property var mimeTypes
67 title: msgConfig.
title 68 modality:
Qt.WindowModal
69 folder: msgConfig.defaultValue
71 if(msgConfig.subType ==
"open")
72 return Labs.FileDialog.OpenFile;
73 else if(msgConfig.subType ==
"files")
74 return Labs.FileDialog.OpenFiles;
75 else if(msgConfig.subType ==
"save")
76 return Labs.FileDialog.SaveFile;
78 return Labs.FileDialog.OpenFile;
83 Component.onCompleted: {
85 msgResult.setCloseTarget(_fileDialog,
"reject()");
90 if(msgConfig.subType ==
"files")
91 msgResult.result = _fileDialog.files;
93 msgResult.result = _fileDialog.file;
94 msgResult.complete(MessageConfig.Ok);
102 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.