Animations with QPropertyAnimation
Learn to make animations using QPropertyAnimation with PyQt.
We'll cover the following...
We'll cover the following...
Creating the animations
In the subsequent application, you will discover how to use pyqtProperty to add new properties to things, how to use the QPropertyAnimation class to animate objects, and how to build a "Qt Graphics View" to display items and animations.
Firstly, we start by importing the required modules.
We must add pyqtProperty to the Objects class to define a position property as QObject lacks one. A pixmap can be added to the QGraphicsScene using QGraphicsPixmapItem(). Using fset, we build a position property that enables ...