Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-1060

Transformed items added to a group can change the size of the QGraphicsScene sceneRect()

    XMLWordPrintable

Details

    Description

      If an item is transformed (eg: translated) and then added to a QGraphicsItemGroup, the scene rect of the QGraphicsScene should only expand to the boundingRect() of the item. However, when the QGraphicsItemGroup::addToGroup() function transforms the coordinates of the item so that it is still placed correctly on the scene, the sceneRect may grow larger than expected. Since the addToGroup() function is documented to maintain the position of the item relative to the scene, one would expect that the size of the sceneRect() does not change either.

      Update: You can easily work around this problem by setting the scene rect explicitly.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bjnilsen Bjørn Erik Nilsen
            jabarron Jason Barron
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes