Uploaded image for project: 'Qt for MCUs'
  1. Qt for MCUs
  2. QTMCU-123

[Text.WordWrap] Word wrapping moves the punctuation mark attached to a word to the next line

    XMLWordPrintable

Details

    • QUL Sprint 4.1/2022

    Description

      If using Text.Wrap wrapping mode in a Text (or any other than Text.NoWrap), punctuation marks (. , ! ?, etc.) that are entered without space next to a word might get wrapped to next line. The current behavior seems to be inconsistent when compared with Qt 6 QML text wrapping handling where it moves the whole word attached to the punctuation mark to the next line if wrapping triggers. So, I'd believe this is a bug. It would be better that the previous word would also be wrapped to next line together with the punctuation mark.

      As an example, the following QML snippet demonstrates the issue:

      
      Rectangle {
       width: 200
       height: 200
      
      Text
      
      {
      
      anchors.fill: parent
      
      anchors.margins: 20
      
      horizontalAlignment: Text.AlignHCenter
      
      verticalAlignment: Text.AlignVCenter
      
      text: "A long text field."
      
      wrapMode: Text.Wrap
      
      }
      
      }
      
      

      Attachments

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

        Activity

          People

            paeglis Gatis Paeglis
            foxxx Tuukka Kettunen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes