What just happened?

The transitions property holds the list of Transition objects for this object. It's possible to specify a different Transition object for each pair of states if you want to perform different animations in different cases. However, you can also use a single Transition object that will affect all transitions. For convenience, QML allows us to assign a single object to a property that expects a list.

A Transition object must contain one or multiple animations that will be applied during this transition. In this example, we added PropertyAnimation that allows us to animate any property of any child object of the main form. The PropertyAnimation QML type has properties that allow you to configure what exactly it will do. We ...

Get Game Programming using Qt 5 Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.