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

QtQuick Text width and contentWidth are twisted

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.9.0, 5.10.0
    • None

    Description

      When creating a QtQuick Text element with multiple lines of text, the width is always bigger than the contentWidth. The very hard-to-understand documentation of contentWidth does not make clear what happens. The documentation of contentHeight and wrapMode implies that contentHeight can be bigger than the height but never less.

      As a normal user I would assume that width/height are always as big as the displayed text.

      In the attached screenshot the red rectangle is based on width/height of the text whereas the green one is based on contentWidth and contentHeight.

      Attachments

        1. qml-text-wrap.qml
          0.6 kB
        2. Screen Shot 2018-01-12 at 15.52.04.png
          Screen Shot 2018-01-12 at 15.52.04.png
          40 kB
        3. t.qml
          3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            gri Christoph Keller
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes