summaryrefslogtreecommitdiffstats
path: root/examples/declarative/animation
diff options
context:
space:
mode:
authorJoona Petrell <joona.t.petrell@nokia.com>2010-08-26 05:08:41 (GMT)
committerJoona Petrell <joona.t.petrell@nokia.com>2010-08-30 04:48:09 (GMT)
commitfce17c2847fa48410adae098b1df3db76fa4ef67 (patch)
treee1794bd2385278471eaebde0b87045b7f982f0b4 /examples/declarative/animation
parent7c81d90e490a95c67e0d0c9a184be479bd59817a (diff)
downloadQt-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/animation')
-rw-r--r--examples/declarative/animation/easing/content/QuitButton.qml12
-rw-r--r--examples/declarative/animation/easing/content/quit.pngbin0 -> 583 bytes
-rw-r--r--examples/declarative/animation/easing/easing.qml19
3 files changed, 28 insertions, 3 deletions
diff --git a/examples/declarative/animation/easing/content/QuitButton.qml b/examples/declarative/animation/easing/content/QuitButton.qml
new file mode 100644
index 0000000..70747a8
--- /dev/null
+++ b/examples/declarative/animation/easing/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/animation/easing/content/quit.png b/examples/declarative/animation/easing/content/quit.png
new file mode 100644
index 0000000..b822057
--- /dev/null
+++ b/examples/declarative/animation/easing/content/quit.png
Binary files differ
diff --git a/examples/declarative/animation/easing/easing.qml b/examples/declarative/animation/easing/easing.qml
index 9cdbad1..b53cb98 100644
--- a/examples/declarative/animation/easing/easing.qml
+++ b/examples/declarative/animation/easing/easing.qml
@@ -39,6 +39,7 @@
****************************************************************************/
import Qt 4.7
+import "content"
Rectangle {
id: window
@@ -134,11 +135,23 @@ Rectangle {
}
Flickable {
- anchors.fill: parent; contentHeight: layout.height
-
+ anchors.fill: parent
+ contentHeight: layout.height
+ Rectangle {
+ id: titlePane
+ color: "#444444"
+ height: 35
+ anchors { top: parent.top; left: parent.left; right: parent.right }
+ QuitButton {
+ id: quitButton
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.right
+ anchors.rightMargin: 10
+ }
+ }
Column {
id: layout
- anchors.left: parent.left; anchors.right: parent.right
+ anchors { top: titlePane.bottom; topMargin: 10; left: parent.left; right: parent.right }
Repeater { model: easingTypes; delegate: delegate }
}
}