Re: QGraphicsItemAnimation



  • What is the point of putting in the "documentation" that an item is "deprecated" when you don't even bother to indicate the intended replacement to someone searching for such functionality?



  • Correct, even if I think there is at least an indication:

    bq. 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().

    So the meaning should be that the QGraphicsItemAnimation should not be used any more in favor of QObject + QGraphicsItem. The deal should be that there is no replacement for such a class.



  • An alternative to QGraphicsItemAnimation (which is a class, not a function) is QGraphicsItemAnimation?

    The documentation for this class is here:

    http://doc.qt.nokia.com/latest/qgraphicsitemanimation.html

    The word alternative doesn't appear on that page, so I don't know what you are quoting. It just says it's deprecated, and leaves the user to fend for himself. To say there is no replacement would mean there is no way to animate such an object, which is not the case.

    I was able to use QPropertyAnimation. If the deprecation notice had indicated this (or something else) as an alternative, then it would have saved me the time of finding it myself--and given me the assurance that this was the best alternative (the latter being something I still don't have).



  • Well, I was reading the documentation about the "advance":http://doc.qt.nokia.com/latest/qgraphicsitem.html#advance method of QGraphicsItem, as an example.



  • I guess (not: know), that "this section":http://doc.qt.nokia.com/latest/graphicsview.html#animation might be the key:
    [quote]Animation
    Graphics View supports animation at several levels. You can easily assemble animation by using the Animation Framework. For that you'll need your items to inherit from QGraphicsObject and associate QPropertyAnimation with them. QPropertyAnimation allows to animate any QObject property.[/quote]

    So, instead of using the specialized graphics view animation framework, you use the more general Qt animation framework.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.