Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.0
- Image {
- id: image
- source: "/images/image.png"
- anchors { top: screen.top; horizontalCenter: screen.horizontalCenter; margins: 150}
- Component.onCompleted: fallingMuffin.start()
- SequentialAnimation {
- id: fallingImage
- running: true
- NumberAnimation {
- target: image
- property: "anchors.margins"
- to: 500
- duration: 1000
- }
- NumberAnimation {
- target: image
- property: "opacity"
- to: 0
- duration: 500
- }
- }
- NumberAnimation on opacity {
- to: 0
- duration: 1000
- onRunningChanged: {
- if(!running) {
- console.log("Destroying!");
- image.destroy();
- gc();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement