From 8ed9a33bcd0350b5b14e5cf573210c7bfca8ab93 Mon Sep 17 00:00:00 2001 From: Filippo Scognamiglio Date: Sun, 21 Dec 2014 16:32:55 +0100 Subject: [PATCH] Fix: send application quit event when qml engine is closed. --- app/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/main.cpp b/app/main.cpp index aceb981..c648430 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -52,5 +52,8 @@ int main(int argc, char *argv[]) engine.load(QUrl("qrc:/main.qml")); + // Quit the application when the engine closes. + QObject::connect((QObject*) &engine, SIGNAL(quit()), (QObject*) &app, SLOT(quit())); + return app.exec(); }