QKeyframeAnimation

A class implementing simple keyframe animation to a QTransform . More

Inheritance diagram of PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation

Synopsis

Functions

Detailed Description

A QKeyframeAnimation class implements simple keyframe animation that can be used to animate QTransform . The keyframes consists of multiple timed QTransforms, which are interpolated and applied to the target QTransform . QEasingCurve is used between keyframes to control the interpolator. RepeatMode can be set for when the position set to the QKeyframeAnimation is below or above the values defined in the keyframe positions.

class PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation([parent=None])
Parameters

parentPySide6.QtCore.QObject

Constructs an QKeyframeAnimation with parent.

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.RepeatMode

This enumeration specifies how position values outside keyframe values are handled.

Constant

Description

Qt3DAnimation.QKeyframeAnimation.None

The animation is not applied to the target transform.

Qt3DAnimation.QKeyframeAnimation.Constant

The edge keyframe value is used.

Qt3DAnimation.QKeyframeAnimation.Repeat

The animation is repeated.

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.addKeyframe(keyframe)
Parameters

keyframePySide6.Qt3DCore.Qt3DCore.QTransform

Adds new keyframe at the end of the animation. The QTransform can be added to the animation multiple times.

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.easing()
Return type

PySide6.QtCore.QEasingCurve

See also

setEasing()

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.easingChanged(easing)
Parameters

easingPySide6.QtCore.QEasingCurve

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.endMode()
Return type

RepeatMode

See also

setEndMode()

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.endModeChanged(endMode)
Parameters

endModeRepeatMode

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.framePositions()
Return type

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.framePositionsChanged(positions)
Parameters

positions

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.keyframeList()
Return type

Returns the list of keyframes.

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.removeKeyframe(keyframe)
Parameters

keyframePySide6.Qt3DCore.Qt3DCore.QTransform

Removes a keyframe from the animation. If the same QTransform is set as keyframe multiple times, all occurrences are removed.

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.setEasing(easing)
Parameters

easingPySide6.QtCore.QEasingCurve

See also

easing()

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.setEndMode(mode)
Parameters

modeRepeatMode

See also

endMode()

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.setFramePositions(positions)
Parameters

positions

See also

framePositions()

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.setKeyframes(keyframes)
Parameters

keyframes

Sets the keyframes of the animation. Old keyframes are cleared.

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.setStartMode(mode)
Parameters

modeRepeatMode

See also

startMode()

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.setTarget(target)
Parameters

targetPySide6.Qt3DCore.Qt3DCore.QTransform

See also

target()

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.setTargetName(name)
Parameters

name – str

See also

targetName()

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.startMode()
Return type

RepeatMode

See also

setStartMode()

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.startModeChanged(startMode)
Parameters

startModeRepeatMode

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.target()
Return type

PySide6.Qt3DCore.Qt3DCore.QTransform

See also

setTarget()

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.targetChanged(target)
Parameters

targetPySide6.Qt3DCore.Qt3DCore.QTransform

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.targetName()
Return type

str

See also

setTargetName()

PySide6.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.targetNameChanged(name)
Parameters

name – str