FinalState QML Type
최종 상태를 제공합니다. 더 보기...
| Import Statement: | import QtQml.StateMachine 6.12 |
| Inherits: |
상세 설명
최종 상태는 상태 기계( StateMachine )의 (일부) 작업이 완료되었음을 알리는 데 사용됩니다. 최상위 최종 상태에 진입하면 상태 기계의 ` finished()` 신호가 발생합니다. 일반적으로 최종 하위 상태(`State`의 자식)에 진입하면 부모 상태의 ` finished()` 신호가 발생합니다. FinalState는 Qt State Machine QML API의 일부입니다 .
최종 상태를 사용하려면 FinalState 객체를 생성하고 다른 상태에서 해당 객체로 이동하는 전환을 추가하면 됩니다.
사용 예
import QtQuick
import QtQml.StateMachine as DSM
Rectangle {
DSM.StateMachine {
id: stateMachine
initialState: state
running: true
DSM.State {
id: state
DSM.TimeoutTransition {
targetState: finalState
timeout: 200
}
}
DSM.FinalState {
id: finalState
}
onFinished: console.log("state finished")
}
}StateMachine 및 State도 참조하십시오 .
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.