Qt Reference Documentation

# Animation: States Example

Files:

- declarative/animation/states/states.svg
- declarative/animation/states/qml/states/states.qml
- declarative/animation/states/qml/states/transitions.qml
- declarative/animation/states/main.cpp
- declarative/animation/states/states.pro
- declarative/animation/states/states.qmlproject

These examples show how to use states and transitions.

The `states.qml` example shows how an item can change between states, and `transitions.qml` shows how these state changes can be animated.

Note: Due to deployment configurations transitions.qml is opened by default when running this example. states.qml can be opened by editing the main.cpp file.

states.qml

transitions.qml