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

QGraphicsItemGroup should have batched addItemToGroup

    XMLWordPrintable

Details

    Description

      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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes