QtMvvm  1.1.0
A mvvm oriented library for Qt, to create Projects for Widgets and Quick in parallel
FolderDialog.qml
1 import QtQuick 2.10
2 import QtQuick.Controls 2.3
3 import Qt.labs.platform 1.0 as Labs
4 import de.skycoder42.QtMvvm.Core 1.1
5 import de.skycoder42.QtMvvm.Quick 1.1
6 
20  id: _folderDialog
21 
23  property var msgConfig
25  property MessageResult msgResult
26 
28  signal closed()
29 
30  title: msgConfig.title
31  modality: Qt.WindowModal
32  folder: msgConfig.defaultValue
33 
34  Component.onCompleted: {
35  if(msgResult)
36  msgResult.setCloseTarget(_folderDialog, "reject()");
37  }
38 
39  onAccepted: {
40  if(msgResult) {
41  msgResult.complete(MessageConfig.Ok, _folderDialog.currentFolder);
42  msgResult = null;
43  }
44  closed();
45  }
46 
47  onRejected: {
48  if(msgResult) {
49  msgResult.complete(MessageConfig.Cancel);
50  msgResult = null;
51  }
52  closed();
53  }
54 }
QString title
The activity title/description of the file chooser.
The QML import for the QtMvvmCore QML module.
Definition: qqmlcoreapp.h:9
The QML import for the QtMvvmQuick QML module.
Definition: ActionButton.qml:4
A folder dialog implementation based on the labs folder dialog.