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

QTextDocument with WrapMode::WrapAtWordBoundaryOrAnywhere wraps incorrectly when the text width is very small.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.2.4
    • GUI: Text handling
    • None

    Description

      When squeezing a QTextDocument to a very narrow width the minimum size suddenly changes as shown in the attached gif.

      I tracked the issue down to this code.

      This seems wrong to me and changing it to use the original word wrap flag WrapAtWordBoundaryOrAnywhere fixes the issue. But I'm very unsure if that is the correct solution as I don't really understand what that code is for. In the normal case it skips that entire if case until it gets to its minimum size, maybe that is the actual issue that it shouldn't trigger at all.

      Attachments

        1. wrapissue.gif
          wrapissue.gif
          91 kB
        2. QTBUG-109031.cpp
          0.9 kB

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            cyriuz Viktor Arvidsson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: