我想声明一些考虑到之前状态的状态。在PropertyChanges
/StateChangeScript
中使用之前的状态名称是否可行?
Item {
states: [
State {
name: "s1"
StateChangeScript {
if (previous_state == "s2")
doSomething();
else
doSomethingElse();
}
},
State {
name: "s2"
},
State {
name: "s3"
}
]
}
属性字符串 previousState onStateChanged: previousState = state
- folibis