Chaining multiple animations

What if we wanted to perform an animation at the end of another animation? We could connect the finished() signal of the first animation to the start() slot of the second one. However, a much more convenient solution is to use QSequentialAnimationGroup. For example, if we want coins to scale and then to fade, the following code will do the trick:

QSequentialAnimationGroup *group = new QSequentialAnimationGroup(this);
group->addAnimation(scaleAnimation);
group->addAnimation(fadeAnimation);
group->start();