TimeoutTransition QML Type
TimeoutTransition 类型提供基于计时器的过渡。更多
Import Statement: | import QtQml.StateMachine 6.9 |
Inherits: |
属性
- timeout : int
详细说明
Timer 类型可与 结合使用,以实现更复杂的基于超时的转换。SignalTransition
TimeoutTransition 是Qt State Machine QML API的一部分。
使用示例
import QtQuick import QtQml.StateMachine as DSM Rectangle { Button { anchors.fill: parent id: button text: "Finish state" enabled: !stateMachine.running onClicked: stateMachine.running = true DSM.StateMachine { id: stateMachine initialState: state running: true DSM.State { id: state DSM.TimeoutTransition { targetState: finalState timeout: 1000 } } DSM.FinalState { id: finalState } } } }
另请参阅 StateMachine,SignalTransition,FinalState, 和HistoryState 。
属性文档
timeout : int |
超时时间间隔(毫秒)。
© 2025 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.