From 62e8934fe3879665d14092543ad06bb17ce9071f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Kundr=C3=A1t?= Date: Tue, 16 Oct 2012 20:33:55 +0200 Subject: [PATCH] Make Qt.quit() from inside QML work in the examples Without this patch, the samegame's quit button does not work. Change-Id: I904832d018d589e90564534ac1eca02e0dbb54fc Reviewed-by: Friedemann Kleint Reviewed-by: Kai Koehne --- examples/shared/shared.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/examples/shared/shared.h b/examples/shared/shared.h index 0e9395a..bf3857f 100644 --- a/examples/shared/shared.h +++ b/examples/shared/shared.h @@ -39,6 +39,7 @@ ****************************************************************************/ #include #include +#include #include #define DECLARATIVE_EXAMPLE_MAIN(NAME) int main(int argc, char* argv[]) \ {\ @@ -68,6 +69,7 @@ qWarning("Could not find file '%s'", qPrintable(QDir::toNativeSeparators(fileName)));\ return -1;\ }\ + view.connect(view.engine(), SIGNAL(quit()), &app, SLOT(quit()));\ view.setSource(QUrl::fromLocalFile(fileName));\ view.show();\ return app.exec();\ -- 1.7.2.5