You already know how to set up a single property animation, so we omitted the code for it. After setting up both animations, we add them to the group animation by calling addAnimation() on the group, while passing a pointer to the animation we would like to add. Then, when we start the group; QParallelAnimationGroup ensures that all assigned animations start at the same time.
When both animations have finished, group will emit the finished() signal. We connected that signal to the deleteLater() slot of our class so that the coin object gets deleted when it's no longer visible. This handy slot is declared in the QObject class and is useful in many cases.