1
states and transition
으로 디자인 된 창이 있습니다. 상태가 바뀌면 transition-animation
이 자동으로 시작되지만 전환 애니메이션이 끝나지 않으면 상태가 바뀌어 문제가 발생한다는 것을 알고 있습니다. 마치 slow in reacting
처럼; 그것을 고치는 방법?QML에서 전환 애니메이션을 중지하는 방법은 무엇입니까?
flickable 한 {
id: content anchors.fill: parent flickableDirection: Flickable.HorizontalFlick contentWidth: width * 2 contentHeight: height clip: true onFlickStarted: { if(horizontalVelocity > 0) { regAndFind.state = "Find" } else { regAndFind.state = "Register" } } ....... }
states: [
State {
name: "Register"
PropertyChanges {
target: slider
x: 0
}
PropertyChanges {
target: content
contentX: 0
}
},
State {
name: "Find"
PropertyChanges {
target: slider
x: parent.width/2
}
PropertyChanges {
target: content
contentX: parent.width
}
}
]
transitions: [
Transition {
NumberAnimation {
target: slider
property: "x"
duration: 600
}
NumberAnimation {
target: content
property: "contentX"
duration: 600
}
}
]