QAbstractState¶
The
QAbstractState
class is the base class of states of aQStateMachine
. More…
Inherited by: QFinalState, QHistoryState, QState, QStateMachine
New in version 4.6.
Synopsis¶
Functions¶
def
active
()def
machine
()def
parentState
()
Virtual functions¶
Signals¶
def
activeChanged
(active)
Detailed Description¶
The
QAbstractState
class is the abstract base class of states that are part of aQStateMachine
. It defines the interface that all state objects have in common.QAbstractState
is part of The State Machine Framework .The
entered()
signal is emitted when the state has been entered. Theexited()
signal is emitted when the state has been exited.The
parentState()
function returns the state’s parent state. Themachine()
function returns the state machine that the state is part of.
Subclassing¶
- class PySide2.QtCore.QAbstractState([parent=None])¶
- param parent:
Constructs a new state with the given
parent
state.
- PySide2.QtCore.QAbstractState.active()¶
- Return type:
bool
This property holds the active property of this state. A state is active between
entered()
andexited()
signals..
- PySide2.QtCore.QAbstractState.activeChanged(active)¶
- Parameters:
active – bool
- PySide2.QtCore.QAbstractState.machine()¶
- Return type:
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)¶
- Parameters:
event –
PySide2.QtCore.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.
- PySide2.QtCore.QAbstractState.onExit(event)¶
- Parameters:
event –
PySide2.QtCore.QEvent
This function is called when the state is exited. The given
event
is what caused the state to be exited. Reimplement this function to perform custom processing when the state is exited.
- PySide2.QtCore.QAbstractState.parentState()¶
- Return type:
Returns this state’s parent state, or
None
if the state has no parent state.
© 2022 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.