summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationBehavior.qml
blob: eb06344ede87c34a3b0984b4ab8db82e02ac7bf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import Qt 4.6

Rectangle {
     width: 400; height: 400; color: "blue"

    Rectangle {
        id: rect1
        color: "red"
        width: 60; height: 60;
        x: 100; y: 100;
        SmoothedAnimation on x { to: 200; velocity: 500 }
        SmoothedAnimation on y { to: 200; velocity: 500 }
    }

     Rectangle {
         objectName: "theRect"
         color: "green"
         width: 60; height: 60;
         x: rect1.x; y: rect1.y;
         Behavior on x { SmoothedAnimation { objectName: "easeX"; velocity: 400 } }
         Behavior on y { SmoothedAnimation { objectName: "easeY"; velocity: 400 } }
     }
 }