MouseArea{
anchors.fill: parent
onClicked:
// rect.y=150
PropertyAnimation{
target:rect
properties:"y"
to:150
duration:1000
onStarted: {
console.log("start")
}
onStopped: {
console.log("stoped")
}
}
}
这一段代码就可以
下面这个为啥就不行啊
Behavior on y {
PropertyAnimation{
// target: rect
id:aa
duration:1000
onStarted: {
console.log("start")
}
onStopped: {
console.log("stoped")
}
}
}