May 2019
Intermediate to advanced
542 pages
13h 37m
English
A QPropertyAnimation object is used to animate a single Qt property of a widget. The class automatically creates an interpolated series of steps between two numeric property values and applies the changes over time.
For example, let's animate our logo so that it scrolls out from left to right. You can begin by adding a property animation object, as follows:
self.heading_animation = qtc.QPropertyAnimation( heading, b'maximumSize')
QPropertyAnimation requires two arguments: a widget (or another type of QObject class) to be animated, and a bytes object indicating the property to be animated (note that this is a bytes object and not a string).
Next, we need to configure our animation object as follows:
self.heading_animation.setStartValue(qtc.QSize(10, ...
Read now
Unlock full access