import QtQuick 1.0 Item { id: myItem width: 400 height: 400 Image { source: "images/background.png" } Image { id: spaceship x: 10 y: 50 source: "images/spaceship.png" } Image { id: myButton source: "images/button.png" anchors.horizontalCenter: myItem.horizontalCenter anchors.bottom: myItem.bottom anchors.bottomMargin: 20 Text { id: myButtonLabel text: "PRESS" color: "white" anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 6 } MouseArea { anchors.fill: parent onClicked:{ myItem.state = "rightBottom" } } } states: [ State { name: "rightBottom" PropertyChanges { target: spaceship x: 250 y: 200 } } ] }