Qt5 C++ GUI Programming Cookbook
上QQ阅读APP看书,第一时间看更新

There's more…

While the property animation works perfectly fine, sometimes it feels a little boring to look at a GUI element being animated at a constant speed. We can make the animation look more interesting by adding an easing curve to control the motion. There are many types of easing curve that you can use in Qt, and here are some of them:

As you can see from the preceding diagram, each easing curve produces a different ease-in and ease-out effect.

For the full list of easing curves available in Qt, please refer to the Qt documentation at http://doc.qt.io/qt-5/qeasingcurve.html#Type-enum.