PySide6.QtStateMachine.QAbstractState¶
- class QAbstractState¶
- The - QAbstractStateclass is the base class of states of a- QStateMachine. More…- Inherited by: - QState,- QStateMachine,- QHistoryState,- QFinalState- Synopsis¶- Properties¶- activeᅟ- The active property of this state. A state is active between entered() and exited() signals
 - Methods¶- def - __init__()
- def - active()
- def - machine()
- def - parentState()
 - Virtual methods¶- Signals¶- def - activeChanged()
- def - entered()
- def - exited()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Detailed Description¶- The - QAbstractStateclass is the abstract base class of states that are part of a- QStateMachine. It defines the interface that all state objects have in common.- QAbstractStateis part of Qt State Machine Framework .- The - entered()signal is emitted when the state has been entered. The- exited()signal is emitted when the state has been exited.- The - parentState()function returns the state’s parent state. The- machine()function returns the state machine that the state is part of.- Subclassing¶- The - onEntry()function is called when the state is entered; reimplement this function to perform custom processing when the state is entered.- The - onExit()function is called when the state is exited; reimplement this function to perform custom processing when the state is exited.- Note - Properties can be used directly when - from __feature__ import true_propertyis used or via accessor functions otherwise.- property activeᅟ: bool¶
 - This property holds the active property of this state. A state is active between - entered()and- exited()signals..- Access functions:
- Signal - activeChanged()
 
 - Constructs a new state with the given - parentstate.- active()¶
- Return type:
- bool 
 
 - Returns whether this state is active. - Getter of property - activeᅟ.- activeChanged(active)¶
- Parameters:
- active – bool 
 
 - This signal is emitted when the active property is changed with - activeas argument.- See also - Notification signal of property - activeᅟ.- entered()¶
 - This signal is emitted when the state has been entered (after - onEntry()has been called).- exited()¶
 - This signal is emitted when the state has been exited (after - onExit()has been called).- machine()¶
- Return type:
 
 - Returns the state machine that this state is part of, or - Noneif the state is not part of a state machine.- This function is called when the state is entered. The given - eventis what caused the state to be entered. Reimplement this function to perform custom processing when the state is entered.- This function is called when the state is exited. The given - eventis what caused the state to be exited. Reimplement this function to perform custom processing when the state is exited.- Returns this state’s parent state, or - Noneif the state has no parent state.