本页内容

QAbstractTransition QML Type

QAbstractTransition 类型是QAbstractState 对象之间过渡的基类。更多...

Import Statement: import QtQml.StateMachine 6.12
Inherited By:

QSignalTransition, SignalTransition, and TimeoutTransition

属性

信号

详细说明

QAbstractTransition 类型是StateMachine 中各状态(QAbstractState 对象)之间过渡的抽象基类。QAbstractTransition 是Qt State Machine QML API的一部分

sourceState() 属性表示过渡的源状态。targetState 和targetStates 属性分别返回过渡的目标状态。

当过渡被触发时,会发出triggered() 信号。

请勿直接使用 QAbstractTransition;请改用SignalTransition 或TimeoutTransition 。

另请参阅 SignalTransition 和TimeoutTransition 。

属性文档

sourceState : bool [read-only]

此转换的源状态(父状态)。

targetState : QAbstractState

此转换的目标状态。

如果一个转换没有目标状态,该转换仍可能被触发,但这不会导致状态机的配置发生变化(即不会退出当前状态并重新进入该状态)。

targetStates : list<QAbstractState>

该跃迁的目标态。

如果指定了多个状态,它们都必须是同一个并行组状态的子状态。

信号文档

triggered()

当状态转换被触发时,会发出此信号。

注意: 对应的处理程序 为onTriggered 。

© 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.