summaryrefslogtreecommitdiffstats
path: root/demos/embedded/qmlcalculator/qmlcalculator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'demos/embedded/qmlcalculator/qmlcalculator.cpp')
-rw-r--r--demos/embedded/qmlcalculator/qmlcalculator.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/demos/embedded/qmlcalculator/qmlcalculator.cpp b/demos/embedded/qmlcalculator/qmlcalculator.cpp
index 3030e81..6c41e61 100644
--- a/demos/embedded/qmlcalculator/qmlcalculator.cpp
+++ b/demos/embedded/qmlcalculator/qmlcalculator.cpp
@@ -42,6 +42,7 @@
#include <QtCore/QFileInfo>
#include <QtGui/QApplication>
#include <QtDeclarative/QDeclarativeView>
+#include <QtDeclarative/QDeclarativeEngine>
#if defined(Q_OS_SYMBIAN)
#include <eikenv.h>
@@ -58,7 +59,8 @@ int main(int argc, char *argv[])
QDeclarativeView view;
view.setSource(QUrl(mainQmlApp));
view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
-
+ QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit()));
+
#if defined(QT_KEYPAD_NAVIGATION)
QApplication::setNavigationMode(Qt::NavigationModeCursorAuto);
#endif // QT_KEYPAD_NAVIGATION