import QtQuick 2.2
Rectangle{
id: rootItem
width: 360
height: 240
color: "#cfcfcf"
Rectangle{
id: rect
width: 50
height: 50
x: 0
y: 5
color: "#c0c0ff"
MouseArea{
id: mouseArea
anchors.fill: parent
onClicked: {
animation.start()
}
}
ParallelAnimation{
id: animation
NumberAnimation{
target: rect
properties: "x"
to: 100
duration: 300
}
NumberAnimation{
target: rect
properties: "y"
to: 100
duration: 300
}
}
}
}