aboutsummaryrefslogtreecommitdiffstats
path: root/examples/shared/shared.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/shared/shared.h')
-rw-r--r--examples/shared/shared.h2
1 files changed, 2 insertions, 0 deletions
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 <QDir>
#include <QGuiApplication>
+#include <QQmlEngine>
#include <QQuickView>
#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();\