Commit e43fab20 authored by J-P Nurmi's avatar J-P Nurmi Committed by The Qt Project
Browse files

ApplicationTemplate: enable Qt.quit() & revise menu items


Change-Id: I0248b95b32b403c3513d442aeb626afd3ead5656
Reviewed-by: default avatarJens Bache-Wiig <jens.bache-wiig@digia.com>
parent b45afb60
Branches
Tags
No related merge requests found
Showing with 5 additions and 5 deletions
...@@ -59,6 +59,7 @@ int main(int argc, char *argv[]) ...@@ -59,6 +59,7 @@ int main(int argc, char *argv[])
qWarning("Error: Your root item has to be a Window."); qWarning("Error: Your root item has to be a Window.");
return -1; return -1;
} }
QObject::connect(&engine, SIGNAL(quit()), &app, SLOT(quit()));
window->show(); window->show();
return app.exec(); return app.exec();
} }
...@@ -48,13 +48,12 @@ ApplicationWindow { ...@@ -48,13 +48,12 @@ ApplicationWindow {
menuBar: MenuBar { menuBar: MenuBar {
Menu { Menu {
text: "Menu 1" text: "File"
MenuItem { text: "Item 1" } MenuItem { text: "Quit"; onTriggered: Qt.quit() }
MenuItem { text: "Item 2" }
} }
Menu { Menu {
text: "Menu 2" text: "Help"
MenuItem { text: "Item 3" } MenuItem { text: "About..."; enabled: false }
} }
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment