diff --git a/qml/Main.qml b/qml/Main.qml index 22ada26..54d0d32 100644 --- a/qml/Main.qml +++ b/qml/Main.qml @@ -1,5 +1,6 @@ import QtQuick import QtQuick.Window +import QtQuick.Dialogs import QtQuick.Controls ApplicationWindow { @@ -24,7 +25,8 @@ ApplicationWindow { Action { text: qsTr("Save") - onTriggered: mainPage.system.writeToAFile(utils.properties(mainPage)) + // onTriggered: mainPage.system.writeToAFile(utils.properties(mainPage)) + onTriggered: fileDialogComponent.open() } MenuSeparator {} @@ -109,6 +111,15 @@ ApplicationWindow { } } + FileDialog { + id: fileDialogComponent + + onAccepted: { + mainPage.system.writeToAFile(utils.properties(mainPage), + fileDialogComponent.currentFile) + } + } + Utils { id: utils }