Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 1.1
- Rectangle {
- width: 1024
- height: 600
- color: "pink"
- Text {
- id: sometext
- text: "Tap and drag"
- scale: 3
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
- Component.onCompleted: {
- myanim.start()
- }
- }
- MouseArea {
- anchors.fill: parent
- onPositionChanged: {
- sometext.x = mouse.x
- sometext.y = mouse.y
- }
- }
- SequentialAnimation {
- id: myanim
- loops: Animation.Infinite
- ParallelAnimation {
- NumberAnimation { target: sometext; property: "rotation";
- from: 0; to: 360; duration: 2000; easing.type: Easing.OutBack;
- }
- NumberAnimation { target: sometext; property: "opacity";
- from: 0; to: 1; duration: 2000; easing.type: Easing.InQuad;
- }
- }
- ParallelAnimation {
- NumberAnimation { target: sometext; property: "rotation";
- from: 0; to: 360; duration: 2000; easing.type: Easing.OutBack;
- }
- NumberAnimation { target: sometext; property: "opacity";
- to: 0.1; duration: 2000; easing.type: Easing.InQuart;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement