diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2010-08-26 05:46:12 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2010-08-26 05:46:12 (GMT) |
commit | 441c9ebdebb17cd31c39a615e82a3ea26f101465 (patch) | |
tree | 84baaa2fa8323b654c4fe63f06286e3e800a4474 /demos/declarative/minehunt | |
parent | f936a199e44a8d443240368f748f7be87cffc186 (diff) | |
parent | 2af41f34eca0effced19b59d4c3327e3e4b627cb (diff) | |
download | Qt-441c9ebdebb17cd31c39a615e82a3ea26f101465.zip Qt-441c9ebdebb17cd31c39a615e82a3ea26f101465.tar.gz Qt-441c9ebdebb17cd31c39a615e82a3ea26f101465.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'demos/declarative/minehunt')
-rw-r--r-- | demos/declarative/minehunt/MinehuntCore/pics/quit.png | bin | 0 -> 583 bytes | |||
-rw-r--r-- | demos/declarative/minehunt/main.cpp | 1 | ||||
-rw-r--r-- | demos/declarative/minehunt/minehunt.qml | 12 |
3 files changed, 13 insertions, 0 deletions
diff --git a/demos/declarative/minehunt/MinehuntCore/pics/quit.png b/demos/declarative/minehunt/MinehuntCore/pics/quit.png Binary files differnew file mode 100644 index 0000000..b822057 --- /dev/null +++ b/demos/declarative/minehunt/MinehuntCore/pics/quit.png diff --git a/demos/declarative/minehunt/main.cpp b/demos/declarative/minehunt/main.cpp index fc223dd..8bbaee9 100644 --- a/demos/declarative/minehunt/main.cpp +++ b/demos/declarative/minehunt/main.cpp @@ -59,6 +59,7 @@ int main(int argc, char *argv[]) #endif canvas.engine()->rootContext()->setContextObject(game); canvas.setSource(QString("minehunt.qml")); + QObject::connect(canvas.engine(), SIGNAL(quit()), &app, SLOT(quit())); #ifdef Q_OS_SYMBIAN canvas.showFullScreen(); diff --git a/demos/declarative/minehunt/minehunt.qml b/demos/declarative/minehunt/minehunt.qml index bc1bf4b..4accb52 100644 --- a/demos/declarative/minehunt/minehunt.qml +++ b/demos/declarative/minehunt/minehunt.qml @@ -67,6 +67,18 @@ Item { x: 20; spacing: 20 anchors.bottom: field.bottom; anchors.bottomMargin: 15 + Image { + source: "MinehuntCore/pics/quit.png" + scale: quitMouse.pressed ? 0.8 : 1.0 + smooth: quitMouse.pressed + y: 10 + MouseArea { + id: quitMouse + anchors.fill: parent + anchors.margins: -20 + onClicked: Qt.quit() + } + } Column { spacing: 2 Image { source: "MinehuntCore/pics/bomb-color.png" } |