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

text elide with Styled text (testing with img tag) does not work

XMLWordPrintable

                  Text {
                      anchors.centerIn: parent
                      width: parent.width / 2
                      font.pointSize: 14
                      elide: Text.ElideRight
                      rotation: 45
      
                   //   textFormat: Text.StyledText // broken elide - image is not considered
                   //   textFormat: Text.RichText // does not respect elide property at all, but this seems to be documented here https://doc.qt.io/qt-6/qml-qtquick-text.html#elide-prop
      
                      text: "This is a <b>happy</b> face<img src=\"images/face-smile.png\"> This is a face."
                  }
      

      The wrapMode property seems to be respected for both rich and styled text. And for other APIs, for example, "linkColor" we do mention that one is supported and other not - "This property works with the StyledText textFormat, but not with RichText." From that I conclude that elide mode is in scope for Styled text and this is a bug.

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

            esabraha Eskil Abrahamsen Blomfeldt
            paeglis Gatis Paeglis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes