summaryrefslogtreecommitdiffstats
path: root/demos/declarative/snake/snake.qml
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-08-30 05:22:28 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-08-30 05:22:28 (GMT)
commit75fc8a8dd52156b2089764ce82925289877eee1d (patch)
tree608754856cf89c768e246f7405f24670d37ecad3 /demos/declarative/snake/snake.qml
parent7c81d90e490a95c67e0d0c9a184be479bd59817a (diff)
downloadQt-75fc8a8dd52156b2089764ce82925289877eee1d.zip
Qt-75fc8a8dd52156b2089764ce82925289877eee1d.tar.gz
Qt-75fc8a8dd52156b2089764ce82925289877eee1d.tar.bz2
Snake: Don't use Behavior with states.
Changing states mid-animation confuses states where property value is not specified explicitly for each state. Task-number: QT-3823
Diffstat (limited to 'demos/declarative/snake/snake.qml')
-rw-r--r--demos/declarative/snake/snake.qml7
1 files changed, 5 insertions, 2 deletions
diff --git a/demos/declarative/snake/snake.qml b/demos/declarative/snake/snake.qml
index 12ad71c..cf037fc 100644
--- a/demos/declarative/snake/snake.qml
+++ b/demos/declarative/snake/snake.qml
@@ -106,7 +106,7 @@ Rectangle {
anchors.fill: parent
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
- Behavior on opacity { NumberAnimation { duration: 500 } }
+ onOpacityChanged: console.log("opacity: "+opacity);
Text {
color: "white"
@@ -236,7 +236,10 @@ Rectangle {
from: "*"
to: "starting"
NumberAnimation { target: progressIndicator; property: "width"; duration: 1000 }
-
+ NumberAnimation { target: title; property: "opacity"; duration: 500 }
+ },
+ Transition {
+ NumberAnimation { target: title; property: "opacity"; duration: 500 }
}
]