O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required