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

QGraphicsItemGroup should have batched addItemToGroup

XMLWordPrintable

      QGraphicsItemGroup's addToGroup method takes only one single item as argument. This method results in the recalculation of it's bounding rectangle, which is an O operation, where n is the number of actual items in the group. Therefore adding k elements takes time proportional to k^2, which can be very painful, obviously.

      Suggestion: there should be a beginAddToGroup() and endAddToGroup() method, and between calling those two, the bounding rect should not be updated.

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

            Unassigned Unassigned
            emvy Mate V
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes