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

Make QStaticText layout lazy

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P1: Critical
    • 4.7.0
    • 4.7.0
    • GUI: Text handling
    • None

    Description

      Currently, the layout of QStaticText will be recalculated every time a integral piece of it is changed. There's potentially a lot of wasted cpu here in the initialization phases.

      What we should rather do is invalidate the layout when integral parts are changed, and then recalculate it when needed, in QPainter::drawStaticText(). To allow people to shuffle the weight of the class over into less performance sensitive stages than the first paint event, add a function to explicitly ask for a new layout. This could be called prepare() or something similar (check what else is in Qt which is like this.) In addition, the current prepare() goes away, and is replaced by things such as setTransform() and setFont().

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            esabraha Eskil Abrahamsen Blomfeldt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes