diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2010-08-26 05:08:41 (GMT) |
---|---|---|
committer | Joona Petrell <joona.t.petrell@nokia.com> | 2010-08-30 04:48:09 (GMT) |
commit | fce17c2847fa48410adae098b1df3db76fa4ef67 (patch) | |
tree | e1794bd2385278471eaebde0b87045b7f982f0b4 /examples/declarative/toys | |
parent | 7c81d90e490a95c67e0d0c9a184be479bd59817a (diff) | |
download | Qt-fce17c2847fa48410adae098b1df3db76fa4ef67.zip Qt-fce17c2847fa48410adae098b1df3db76fa4ef67.tar.gz Qt-fce17c2847fa48410adae098b1df3db76fa4ef67.tar.bz2 |
Fix application exiting in embedded qml examples
Task-number: QTBUG-13178
Reviewed-by: Martin Jones
Diffstat (limited to 'examples/declarative/toys')
-rw-r--r-- | examples/declarative/toys/clocks/clocks.qml | 5 | ||||
-rw-r--r-- | examples/declarative/toys/clocks/content/QuitButton.qml | 12 | ||||
-rw-r--r-- | examples/declarative/toys/clocks/content/quit.png | bin | 0 -> 583 bytes |
3 files changed, 17 insertions, 0 deletions
diff --git a/examples/declarative/toys/clocks/clocks.qml b/examples/declarative/toys/clocks/clocks.qml index 124e391..82a1dbf 100644 --- a/examples/declarative/toys/clocks/clocks.qml +++ b/examples/declarative/toys/clocks/clocks.qml @@ -51,4 +51,9 @@ Rectangle { Clock { city: "Mumbai"; shift: 5.5 } Clock { city: "Tokyo"; shift: 9 } } + QuitButton { + anchors.right: parent.right + anchors.top: parent.top + anchors.margins: 10 + } } diff --git a/examples/declarative/toys/clocks/content/QuitButton.qml b/examples/declarative/toys/clocks/content/QuitButton.qml new file mode 100644 index 0000000..70747a8 --- /dev/null +++ b/examples/declarative/toys/clocks/content/QuitButton.qml @@ -0,0 +1,12 @@ +import Qt 4.7 +Image { + source: "quit.png" + scale: quitMouse.pressed ? 0.8 : 1.0 + smooth: quitMouse.pressed + MouseArea { + id: quitMouse + anchors.fill: parent + anchors.margins: -10 + onClicked: Qt.quit() + } +}
\ No newline at end of file diff --git a/examples/declarative/toys/clocks/content/quit.png b/examples/declarative/toys/clocks/content/quit.png Binary files differnew file mode 100644 index 0000000..b822057 --- /dev/null +++ b/examples/declarative/toys/clocks/content/quit.png |