What just happened?

We have set the property value sources on needle rotations that are triggered whenever a new value for the property is requested. Instead of immediately accepting the new value, the Behavior element intercepts the request and starts the SmoothedAnimation class to gradually reach the requested value. The SmoothedAnimation class is an animation type that animates numeric properties. The speed of the animation is not determined by its duration; instead, a velocity property is set. This property dictates how fast a value is to be changed. However, the animation is using a non-linear path—it starts slowly, then accelerates to the given velocity, and, near the end of the animation, decelerates in a smooth fashion. This yields ...

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.