Bringing life into static user interfaces
What we have described so far can be called anything but "fluid." Let's change that now by learning how to add some dynamics into the user interfaces we create. Thus far, books cannot contain moving pictures, so most things we describe here you will have to test yourself by running the provided Qt Quick code.
Animating elements
Qt Quick provides a very extensive framework for creating animations. By that, we don't mean only moving items around. We define an animation as changing an arbitrary value over time. So, what can we animate? Of course, we can animate item geometry. But we can also animate rotation, scale, other numeric values, and even colors. But let's not stop here. Qt Quick also lets you animate the parent-child hierarchy of items or anchor assignments. Almost anything that can be represented by an item property can be animated.
Moreover, the changes are rarely linear—if you kick a ball in the air, it first...