diff options
Diffstat (limited to 'examples/declarative/tvtennis/tvtennis.qml')
-rw-r--r-- | examples/declarative/tvtennis/tvtennis.qml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/declarative/tvtennis/tvtennis.qml b/examples/declarative/tvtennis/tvtennis.qml index fcb285d..9d107ad 100644 --- a/examples/declarative/tvtennis/tvtennis.qml +++ b/examples/declarative/tvtennis/tvtennis.qml @@ -1,4 +1,4 @@ -import Qt 4.6 +import Qt 4.7 import Qt.multimedia 4.7 Rectangle { @@ -10,7 +10,7 @@ Rectangle { Rectangle { // Add a property for the target y coordinate property int targetY : page.height - 10 - property var direction : "right" + property variant direction : "right" id: ball color: "Lime" @@ -31,7 +31,7 @@ Rectangle { } // Make y follow the target y coordinate, with a velocity of 200 - SpringFollow on y { source: ball.targetY; velocity: 200 } + SpringFollow on y { to: ball.targetY; velocity: 200 } // Detect the ball hitting the top or bottom of the view and bounce it onYChanged: { @@ -52,7 +52,7 @@ Rectangle { color: "Lime" x: 2; width: 20; height: 90 SpringFollow on y { - source: ball.y - 45; velocity: 300 + to: ball.y - 45; velocity: 300 enabled: ball.direction == 'left' } } @@ -61,7 +61,7 @@ Rectangle { color: "Lime" x: page.width - 22; width: 20; height: 90 SpringFollow on y { - source: ball.y-45; velocity: 300 + to: ball.y-45; velocity: 300 enabled: ball.direction == 'right' } } |