Add a menu to main.qml

Add a menu with an Exit submenu in the main.qml file. This closes
the application when clicked.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Grace Karanja 2015-05-27 13:34:55 +03:00 committed by Dirk Hohndel
parent 424cf6ca57
commit e2c1d24d02

View file

@ -0,0 +1,18 @@
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Window 2.2
ApplicationWindow {
title: qsTr("Subsurface")
width: 500;
height: 700
menuBar: MenuBar {
Menu {
title: qsTr("File")
MenuItem {
text: qsTr("Exit")
onTriggered: Qt.quit();
}
}
}
}