QAbstractStateclass is the base class of states of aQStateMachine. 更多 …
继承者: QFinalState , QHistoryState , QState , QStateMachine
4.6 版新增。
QAbstractStateclass is the abstract base class of states that are part of aQStateMachine. It defines the interface that all state objects have in common.QAbstractStateis part of 状态机框架 .
entered()signal is emitted when the state has been entered. Theexited()signal is emitted when the state has been exited.
parentState()function returns the state’s parent state. Themachine()function returns the state machine that the state is part of.
QAbstractState
(
[
parent=None
]
)
¶
- param parent
Constructs a new state with the given
parent
状态。
PySide2.QtCore.QAbstractState.
active
(
)
¶
bool
Returns whether this state is active.
另请参阅
activeChanged(bool)
entered()
exited()
PySide2.QtCore.QAbstractState.
activeChanged
(
active
)
¶
active
–
bool
PySide2.QtCore.QAbstractState.
machine
(
)
¶
Returns the state machine that this state is part of, or
None
if the state is not part of a state machine.
PySide2.QtCore.QAbstractState.
onEntry
(
event
)
¶
event
–
QEvent
This function is called when the state is entered. The given
event
is what caused the state to be entered. Reimplement this function to perform custom processing when the state is entered.