~saviq/ubuntu/saucy/qtdeclarative-opensource-src/add-qtquick-delegate-range

« back to all changes in this revision

Viewing changes to tests/auto/quick/qquickbehaviors/data/reassignedAnimation.qml

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 14:17:19 UTC
  • Revision ID: package-import@ubuntu.com-20130205141719-qqeyml8wslpyez52
Tags: upstream-5.0.1
ImportĀ upstreamĀ versionĀ 5.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
Rectangle {
 
3
    width: 400
 
4
    height: 400
 
5
    Rectangle {
 
6
        id: rect
 
7
        objectName: "MyRect"
 
8
        width: 100; height: 100; color: "green"
 
9
        Behavior on x {
 
10
            id: myBehavior
 
11
            objectName: "MyBehavior"
 
12
            NumberAnimation {id: na1; duration: 200 }
 
13
        }
 
14
    }
 
15
    MouseArea {
 
16
        id: clicker
 
17
        anchors.fill: parent
 
18
    }
 
19
    states: State {
 
20
        name: "moved"
 
21
        when: clicker.pressed
 
22
        PropertyChanges {
 
23
            target: rect
 
24
            x: 200
 
25
        }
 
26
    }
 
27
 
 
28
    NumberAnimation {id: na2; duration: 1000 }
 
29
    Component.onCompleted: {
 
30
        myBehavior.animation = na2;
 
31
    }
 
32
}