States, state machine, and transitions in Qt Quick
Qt Quick states are property configurations in which a property's value can change to reflect different states. State changes cause abrupt changes in property; animations smooth transitions to create visually appealing state changes. Types for creating and executing state graphs in QML are provided by the Declarative State Machine Framework. Consider using the QML states and transitions for user interfaces with multiple visual states that are independent of the application's logical state.
You can import the state machine module and the QML types into your application by adding the following statement:
import QtQml.StateMachine
Please note that there are two ways to define the states in QML. One is provided by QtQuick
and the other by the QtQml.StateMachine
module.
Important note
While using QtQuick
and QtQml.StateMachine
in a single QML file, make sure to import QtQml.StateMachine
after QtQuick
. In this approach...