From 62e8934fe3879665d14092543ad06bb17ce9071f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= Date: Tue, 16 Oct 2012 20:33:55 +0200 Subject: 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 file changed, 2 insertions(+) (limited to 'examples/shared') diff --git a/examples/shared/shared.h b/examples/shared/shared.h index 0e9395a108..bf3857f896 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();\ -- cgit v1.2.3