KAnimatedButton Class Reference
from PyKDE5.kwidgetsaddons import *
Inherits: QToolButton → QAbstractButton → QWidget → QObject
Detailed Description
An extended version of QToolButton which can display an animation.
This widget extends QToolButton with the ability to display an animation. All you need to do is pass along a path to a file containing an animation, it can be anything supported by QMovie, or a picture containing all the frames of the animation next to each other (each frame being assumed of having the same size).
Methods | |
__init__ (self, QWidget parent=0) | |
QString | animationPath (self) |
setAnimationPath (self, QString path) | |
start (self) | |
stop (self) |
Method Documentation
__init__ | ( | self, | ||
QWidget | parent=0 | |||
) |
Construct an animated tool button.
- Parameters:
-
parent The parent widget
QString animationPath | ( | self ) |
Returns the path used to load the animation
setAnimationPath | ( | self, | ||
QString | path | |||
) |
Sets the path to the file which contains the animation to load.
- Parameters:
-
path The path of the file containing the animation
start | ( | self ) |
Starts the animation from frame 1
stop | ( | self ) |
Stops the animation. This will also reset the widget to frame 1.