QAbstractTransition QML Type | Qt State Machine | Qt 6.11.1
Description: The QAbstractTransition type is the base type of transitions between QAbstractState objects.

- Qt 6.11
- Qt State Machine
- QML Types
- QAbstractTransition
- Qt 6.11.1 Reference Documentation

# QAbstractTransition QML Type

The QAbstractTransition type is the base type of transitions between QAbstractState objects. More...

Import Statement: | `import QtQml.StateMachine 6.11`
Inherited By: | QSignalTransition, SignalTransition, and TimeoutTransition

- List of all members, including inherited members

## Properties

- sourceState : bool
- targetState : QAbstractState
- targetStates : list<QAbstractState>

## Signals

- triggered()

## Detailed Description

The QAbstractTransition type is the abstract base type of transitions between states (QAbstractState objects) of a StateMachine. QAbstractTransition is part of Qt State Machine QML API

The sourceState() property has the source of the transition. The targetState and targetStates properties return the target(s) of the transition.

The triggered() signal is emitted when the transition has been triggered.

Do not use QAbstractTransition directly; use SignalTransition or TimeoutTransition instead.

See also SignalTransition and TimeoutTransition.

## Property Documentation

### sourceState : bool `[read-only]`

The source state (parent) of this transition.

### targetState : QAbstractState

The target state of this transition.

If a transition has no target state, the transition may still be triggered, but this will not cause the state machine's configuration to change (i.e. the current state will not be exited and re-entered).

### targetStates : list<QAbstractState>

The target states of this transition.

If multiple states are specified, they all must be descendants of the same parallel group state.

## Signal Documentation

### triggered()

This signal is emitted when the transition has been triggered.

Note: The corresponding handler is `onTriggered`.