Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Re: QGraphicsItemAnimation

    General and Desktop
    3
    5
    3720
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mark100net last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • F
        fluca1978 last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • M
          mark100net last edited by

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

          1 Reply Last reply Reply Quote 0
          • F
            fluca1978 last edited by

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

            1 Reply Last reply Reply Quote 0
            • A
              andre last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post