From 6ba5b45c004e19b2845acdb549d727f3c80b5c51 Mon Sep 17 00:00:00 2001 From: Grace Karanja Date: Thu, 4 Jun 2015 11:27:38 +0300 Subject: [PATCH] Add FileOpen dialog to QML Add a dialog to select dive files in the QML interface, and also add a menu entry to open the dialog. Signed-off-by: Grace Karanja Signed-off-by: Dirk Hohndel --- qt-mobile/main.qml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/qt-mobile/main.qml b/qt-mobile/main.qml index 52cfd9838..a98fb14d6 100644 --- a/qt-mobile/main.qml +++ b/qt-mobile/main.qml @@ -1,14 +1,27 @@ import QtQuick 2.3 import QtQuick.Controls 1.2 import QtQuick.Window 2.2 +import QtQuick.Dialogs 1.2 ApplicationWindow { title: qsTr("Subsurface") width: 500; height: 700 + + FileDialog { + id: fileOpen + selectExisting: true + selectMultiple: true + } + menuBar: MenuBar { Menu { title: qsTr("File") + MenuItem { + text: qsTr("Open") + onTriggered: fileOpen.open() + } + MenuItem { text: qsTr("Exit") onTriggered: Qt.quit();