May 2019
Intermediate to advanced
542 pages
13h 37m
English
As we add more and more animations to a GUI, we may find it necessary to group them together so that we can control the animations as a group. This can be done using the animation group classes, QParallelAnimationGroup and QSequentialAnimationGroup.
Both of these classes allow us to add multiple animations to the group and start, stop, pause, and resume the animations as a group.
For example, let's group our button animations as follows:
self.button_animations = qtc.QParallelAnimationGroup() self.button_animations.addAnimation(self.text_color_animation) self.button_animations.addAnimation(self.bg_color_animation)
QParallelAnimationGroup plays all animations in parallel whenever its start() method is called. In contrast, ...
Read now
Unlock full access