Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Re: QGraphicsItemAnimation
Forum Updated to NodeBB v4.3 + New Features

Re: QGraphicsItemAnimation

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 4.1k Views 1 Watching
  • 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 Offline
    M Offline
    mark100net
    wrote on last edited by
    #1

    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
    0
    • F Offline
      F Offline
      fluca1978
      wrote on last edited by
      #2

      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
      0
      • M Offline
        M Offline
        mark100net
        wrote on last edited by
        #3

        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
        0
        • F Offline
          F Offline
          fluca1978
          wrote on last edited by
          #4

          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
          0
          • A Offline
            A Offline
            andre
            wrote on last edited by
            #5

            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
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved