PythonQt.QtCore.QPropertyAnimation
QPropertyAnimation
PythonQtInstanceWrapper object
Native bases: PythonQtInstanceWrapper
Supplemental documentation: Qt 5 reference:
Detailed Description
QPropertyAnimation interpolates over Qt properties. As property values are stored in QVariants, the class inherits QVariantAnimation, and supports animation of the same meta types as its super class.
A class declaring properties must be a QObject. To make it possible to animate a property, it must provide a setter (so that QPropertyAnimation can set the property's value). Note that this makes it possible to animate many of Qt's widgets. Let's look at an example:
QPropertyAnimation *animation = new QPropertyAnimation(myWidget, "geometry");
animation->setDuration(10000);
animation->setStartValue(QRect(0, 0, 100, 30));
animation->setEndValue(QRect(250, 250, 100, 30));
animation->start();
The property name and the QObject instance of which property should be animated are passed to the constructor. You can then specify the start and end value of the property. The procedure is equal for properties in classes you have implemented yourself--just check with QVariantAnimation that your QVariant type is supported.
The QVariantAnimation class description explains how to set up the animation in detail. Note, however, that if a start value is not set, the property will start at the value it had when the QPropertyAnimation instance was created.
QPropertyAnimation works like a charm on its own. For complex animations that, for instance, contain several objects, QAnimationGroup is provided. An animation group is an animation that can contain other animations, and that can manage when its animations are played. Look at QParallelAnimationGroup for an example.
Source: https://doc.qt.io/archives/qt-5.15/qpropertyanimation.html
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
Backward |
attribute | Any |
(shared captured text) |
DeleteWhenStopped |
attribute | Any |
(shared captured text) |
DeletionPolicy |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
Direction |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
Forward |
attribute | Any |
(shared captured text) |
KeepWhenStopped |
attribute | Any |
(shared captured text) |
Paused |
attribute | Any |
(shared captured text) |
Running |
attribute | Any |
(shared captured text) |
State |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
Stopped |
attribute | Any |
(shared captured text) |
__init__ |
function | (self, *args: Any, **kwargs: Any) -> None |
Native constructor; consult class documentation for supported overloads. (shared captured text) |
blockSignals |
function | (self, b: Any) -> bool |
X.blockSignals(b) -> bool (shared captured text) |
childEvent |
function | (self, event: Any) -> Any |
(shared captured text) |
children |
function | (self) -> tuple |
X.children() -> tuple (shared captured text) |
className |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the classname of the object (shared captured text) |
connect |
function | (self, signal: Any, receiver: Any, slot: Any, type: Any) -> bool |
X.connect(signal, receiver, slot, type) -> bool (shared captured text) |
currentLoop |
attribute | Any |
(shared captured text) |
currentLoopChanged |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtCore.QPropertyAnimation.currentLoopChanged; argument details are not documented. |
currentLoopTime |
function | (self) -> int |
X.currentLoopTime() -> int (shared captured text) |
currentTime |
attribute | Any |
(shared captured text) |
currentValue |
attribute | Any |
|
customEvent |
function | (self, event: Any) -> Any |
(shared captured text) |
delete |
function | (self, *args: Any, **kwargs: Any) -> Any |
Deletes the C++ object (at your own risk, my friend!) (shared captured text) |
deleteLater |
function | (self) -> Any |
(shared captured text) |
destroyed |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtCore.QPropertyAnimation.destroyed; argument details are not documented. |
direction |
attribute | Any |
(shared captured text) |
directionChanged |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtCore.QPropertyAnimation.directionChanged; argument details are not documented. |
disconnect |
function | (self, signal: Any, receiver: Any, slot: Any) -> bool |
X.disconnect(signal, receiver, slot) -> bool (shared captured text) |
dumpObjectInfo |
function | (self) -> Any |
(shared captured text) |
dumpObjectTree |
function | (self) -> Any |
(shared captured text) |
duration |
attribute | Any |
(shared captured text) |
dynamicPropertyNames |
function | (self) -> Any |
(shared captured text) |
easingCurve |
attribute | QEasingCurve |
|
endValue |
attribute | Any |
|
event |
function | (self, event: Any) -> bool |
X.event(event) -> bool |
eventFilter |
function | (self, watched: Any, event: Any) -> bool |
X.eventFilter(watched, event) -> bool (shared captured text) |
findChild |
function | (self, type: Any, name: Any) -> Any |
X.findChild(type, name) -> PythonQt.private.QObject (shared captured text) |
findChildren |
function | (self, type: Any, name: Any) -> tuple |
X.findChildren(type, name) -> tuple (shared captured text) |
finished |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtCore.QPropertyAnimation.finished; argument details are not documented. |
group |
function | (self) -> Any |
X.group() -> PythonQt.QtCore.QAnimationGroup (shared captured text) |
help |
function | (self, *args: Any, **kwargs: Any) -> Any |
Shows the help of available methods for this class (shared captured text) |
inherits |
function | (self, *args: Any, **kwargs: Any) -> Any |
Returns if the class inherits or is of given type name (shared captured text) |
installEventFilter |
function | (self, filterObj: Any) -> Any |
(shared captured text) |
interpolated |
function | (self, *args: Any, **kwargs: Any) -> Any |
X.interpolated(from, to, progress) -> object |
isSignalConnected |
function | (self, signal: Any) -> bool |
X.isSignalConnected(signal) -> bool (shared captured text) |
isWidgetType |
function | (self) -> bool |
X.isWidgetType() -> bool (shared captured text) |
isWindowType |
function | (self) -> bool |
X.isWindowType() -> bool (shared captured text) |
keyValueAt |
function | (self, step: Any) -> Any |
X.keyValueAt(step) -> object |
keyValues |
function | (self) -> tuple |
X.keyValues() -> tuple |
killTimer |
function | (self, id: Any) -> Any |
(shared captured text) |
loopCount |
attribute | Any |
(shared captured text) |
metaObject |
function | (self) -> Any |
X.metaObject() -> PythonQt.QtCore.QMetaObject (shared captured text) |
moveToThread |
function | (self, thread: Any) -> Any |
(shared captured text) |
objectName |
attribute | Any |
(shared captured text) |
objectNameChanged |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtCore.QPropertyAnimation.objectNameChanged; argument details are not documented. |
parent |
function | (self) -> Any |
X.parent() -> PythonQt.private.QObject (shared captured text) |
pause |
function | (self) -> Any |
(shared captured text) |
property |
function | (self, name: Any) -> Any |
X.property(name) -> object (shared captured text) |
propertyName |
attribute | bytes |
This property holds the target property name for this animation |
removeEventFilter |
function | (self, obj: Any) -> Any |
(shared captured text) |
resume |
function | (self) -> Any |
(shared captured text) |
sender |
function | (self) -> Any |
X.sender() -> PythonQt.private.QObject (shared captured text) |
senderSignalIndex |
function | (self) -> int |
X.senderSignalIndex() -> int (shared captured text) |
setCurrentTime |
function | (self, msecs: Any) -> Any |
(shared captured text) |
setDirection |
function | (self, direction: Any) -> Any |
(shared captured text) |
setDuration |
function | (self, msecs: Any) -> Any |
|
setEasingCurve |
function | (self, easing: Any) -> Any |
|
setEndValue |
function | (self, value: Any) -> Any |
|
setKeyValueAt |
function | (self, step: Any, value: Any) -> Any |
X.setKeyValueAt(step, value) |
setKeyValues |
function | (self, values: Any) -> Any |
|
setLoopCount |
function | (self, loopCount: Any) -> Any |
(shared captured text) |
setObjectName |
function | (self, name: Any) -> Any |
(shared captured text) |
setParent |
function | (self, parent: Any) -> Any |
(shared captured text) |
setPaused |
function | (self, a: Any) -> Any |
(shared captured text) |
setProperty |
function | (self, name: Any, value: Any) -> bool |
X.setProperty(name, value) -> bool (shared captured text) |
setPropertyName |
function | (self, propertyName: Any) -> None |
|
setStartValue |
function | (self, value: Any) -> Any |
|
setTargetObject |
function | (self, target: Any) -> None |
|
signalsBlocked |
function | (self) -> bool |
X.signalsBlocked() -> bool (shared captured text) |
start |
function | (self, policy: Any) -> Any |
(shared captured text) |
startTimer |
function | (self, interval: Any, timerType: Any) -> int |
X.startTimer(interval, timerType) -> int (shared captured text) |
startValue |
attribute | Any |
|
state |
attribute | Any |
(shared captured text) |
stateChanged |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtCore.QPropertyAnimation.stateChanged; argument details are not documented. |
stop |
function | (self) -> Any |
(shared captured text) |
targetObject |
attribute | QObject |
This property holds the target [QObject](https://doc.qt.io/archives/qt-5.15/qobject.html) for this animation. |
thread |
function | (self) -> Any |
(shared captured text) |
timerEvent |
function | (self, event: Any) -> Any |
(shared captured text) |
totalDuration |
function | (self) -> int |
X.totalDuration() -> int (shared captured text) |
tr |
function | (self, text: Any, ambig: Any, n: Any) -> str |
X.tr(text, ambig, n) -> str (shared captured text) |
updateCurrentTime |
function | (self, arg__1: Any) -> Any |
|
updateCurrentValue |
function | (self, value: Any) -> None |
This virtual function is called by [QVariantAnimation](https://doc.qt.io/archives/qt-5.15/qvariantanimation.html) whenever the current value changes. value is the new, updated value. |
updateDirection |
function | (self, direction: Any) -> Any |
(shared captured text) |
updateState |
function | (self, newState: Any, oldState: Any) -> None |
X.updateState(newState, oldState) |
valueChanged |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.QtCore.QPropertyAnimation.valueChanged; argument details are not documented. |