\snippet code/src_corelib_tools_qtimeline.cpp 0
- You can also use QTimeLine with the
- \l{Graphics View}{Graphics View framework} for
- animations. The QGraphicsItemAnimation class implements animation
- of \l{QGraphicsItem}{QGraphicsItems} with a timeline.
-
By default the timeline runs once, from the beginning and towards the end,
upon which you must call start() again to restart from the beginning. To
make the timeline loop, you can call setLoopCount(), passing the number of
finally grows slowly. For a custom timeline, you can reimplement
valueForTime(), in which case QTimeLine's curveShape property is ignored.
- \sa QProgressBar, QProgressDialog, QGraphicsItemAnimation
+ \sa QProgressBar, QProgressDialog
*/
/*!
The default implementation does nothing.
- For individual item animation, an alternative to this function is to
- either use QGraphicsItemAnimation, or to multiple-inherit from QObject and
- QGraphicsItem, and animate your item using QObject::startTimer() and
- QObject::timerEvent().
+ This function is intended for animations. An alternative is to
+ multiple-inherit from QObject and QGraphicsItem and use the \l{The Animation
+ Framework}{Animation Framework}.
- \sa QGraphicsItemAnimation, QTimeLine
+ \sa QGraphicsScene::advance(), QTimeLine
*/
void QGraphicsItem::advance(int phase)
{
move. In the first phase, QGraphicsItem::advance() is called passing a
value of 0 as an argument, and 1 is passed in the second phase.
- \sa QGraphicsItem::advance(), QGraphicsItemAnimation, QTimeLine
+ Note that you can also use the \l{The Animation Framework}{Animation
+ Framework} for animations.
+
+ \sa QGraphicsItem::advance(), QTimeLine
*/
void QGraphicsScene::advance()
{