Home

QtPropertyAnimation Class Reference
[QtCore module]

The QtPropertyAnimation class animates properties for QObject(and QWidget) More...

 #include <QtPropertyAnimation>

This class is under development and is subject to change.

Inherits QtVariantAnimation.

Properties

Public Functions

Protected Functions

Additional Inherited Members


Detailed Description

The QtPropertyAnimation class animates properties for QObject(and QWidget)

This class is part of {The Animation Framework}. You can use QtPropertyAnimation by itself as a simple animation class, or as part of more complex animations through QtAnimationGroup.

The most common way to use QtPropertyAnimation is to construct an instance of it by passing a pointer to a QObject or a QWidget, and the name of the property you would like to animate to QtPropertyAnimation's constructor.

The start value of the animation is optional. If you do not set any start value, the animation will operate on the target's current property value at the point when the animation was started. You can call setStartValue() to set the start value, and setEndValue() to set the target value for the animated property.

Animations can operate on QObjects and QWidgets. You can choose to assign a target object by either calling setTargetObject() or by passing a QObject pointer to QtPropertyAnimation's constructor.

See also QtVariantAnimation, QtAnimationGroup, and The Animation Framework.


Property Documentation

propertyName : QByteArray

This property holds the target property name for this animation.

This property defines the target property name for this animation. The property name is required for the animation to operate.

Access functions:

targetObject : QObject *

This property holds the target QObject for this animation.

This property defines the target QObject for this animation.

Access functions:


Member Function Documentation

QtPropertyAnimation::QtPropertyAnimation ( QObject * parent = 0 )

Construct a QtPropertyAnimation object. parent is passed to QObject's constructor.

QtPropertyAnimation::QtPropertyAnimation ( QObject * target, const QByteArray & propertyName, QObject * parent = 0 )

Construct a QtPropertyAnimation object. parent is passed to QObject's constructor. The animation changes the property propertyName on target. The default duration is 250ms.

See also targetObject and propertyName.

QtPropertyAnimation::~QtPropertyAnimation ()

Destroys the QtPropertyAnimation instance.

void QtPropertyAnimation::updateCurrentValue ( const QVariant & value )   [virtual protected]

This virtual function is called by QtVariantAnimation whenever the current value changes. value is the new, updated value. It updates the current value of the property on the target object.

Reimplemented from QtVariantAnimation.

See also currentValue and currentTime.


Copyright © 2009 Nokia Trademarks
Qt Solutions