QtMvvm  1.0.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.0
5 import de.skycoder42.QtMvvm.Quick 1.0
6 
19  id: _folderDialog
20 
22  property var msgConfig
24  property MessageResult msgResult
25 
27  signal closed()
28 
29  title: msgConfig.title
30  modality: Qt.WindowModal
31  folder: msgConfig.defaultValue
32 
33  Component.onCompleted: {
34  if(msgResult)
35  msgResult.setCloseTarget(_folderDialog, "reject()");
36  }
37 
38  onAccepted: {
39  if(msgResult) {
40  msgResult.complete(MessageConfig.Ok, _folderDialog.currentFolder);
41  msgResult = null;
42  }
43  closed();
44  }
45 
46  onRejected: {
47  if(msgResult) {
48  msgResult.complete(MessageConfig.Cancel);
49  msgResult = null;
50  }
51  closed();
52  }
53 }
QString title
The activity title/description of the file chooser.
The QML import for the QtMvvmCore QML module.
The QML import for the QtMvvmQuick QML module.
Definition: ActionButton.qml:4
A folder dialog implementation based on the labs folder dialog.