summaryrefslogtreecommitdiffstats
path: root/src/corelib/animation
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-11-09 17:44:54 +0100
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-11-09 17:46:47 +0100
commitecdecf7a628aa1c9eb953984c89fc65ffa767a24 (patch)
tree90573e44b1d3defa27eefef82bc0a132274e866f /src/corelib/animation
parent963d42fbf1fb68c2bd09b12dedbad000d8001b94 (diff)
Fix docs for animation api
All animation api code snippets should use references instead of local variables. Task-number: QTBUG-5616 Reviewed-by: thierry
Diffstat (limited to 'src/corelib/animation')
-rw-r--r--src/corelib/animation/qpropertyanimation.cpp10
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.cpp8
2 files changed, 9 insertions, 9 deletions
diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp
index 30650831bc..013ff7fe54 100644
--- a/src/corelib/animation/qpropertyanimation.cpp
+++ b/src/corelib/animation/qpropertyanimation.cpp
@@ -58,12 +58,12 @@
an example:
\code
- QPropertyAnimation animation(myWidget, "geometry");
- animation.setDuration(10000);
- animation.setStartValue(QRect(0, 0, 100, 30));
- animation.setEndValue(QRect(250, 250, 100, 30));
+ 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();
+ animation->start();
\endcode
The property name and the QObject instance of which property
diff --git a/src/corelib/animation/qsequentialanimationgroup.cpp b/src/corelib/animation/qsequentialanimationgroup.cpp
index 861e26e78f..5dbb8c3d10 100644
--- a/src/corelib/animation/qsequentialanimationgroup.cpp
+++ b/src/corelib/animation/qsequentialanimationgroup.cpp
@@ -63,12 +63,12 @@
pause to a sequential animation group.
\code
- QSequentialAnimationGroup group;
+ QSequentialAnimationGroup *group = new QSequentialAnimationGroup;
- group.addAnimation(anim1);
- group.addAnimation(anim2);
+ group->addAnimation(anim1);
+ group->addAnimation(anim2);
- group.start();
+ group->start();
\endcode
In this example, \c anim1 and \c anim2 are two already set up