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

Change API of QStaticText::setMaximumSize() to setLineWidth()

    XMLWordPrintable

Details

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

    Description

      setMaximumSize() is limiting. There's no need to require that people calculate the height of the text prior to using QStaticText. Use setLineWidth() to be symmetrical with QTextLayout. This will only affect line breaks. People can set a clip on the painter themselves if this is also required.

      This will also require some rethinking on part of the different interpretation of the position of the text when the line width is set and not. It doesn't make sense to have different interpretations. We should stop mirroring the behavior of drawText() exactly and just start interpreting the position as the top left of the text always. This is easier to explain and more predictable.

      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