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

Images in wrapped text positioned incorrectly.

    XMLWordPrintable

Details

    Description

      An image embedded in a Text item that causes a line to wrap will be positioned at the top of the paragraph instead of the new line. If the new line containing the images has text preceding the image it is positioned correctly. The text following the image is positioned correctly in both instances.

      The code below demonstrates the issue.

      import QtQuick 2.0
      
      Item {
          width: 200
          height: 300
      
          Rectangle {
              x: txt.x
              y: txt.y
              width: txt.width
              height: txt.implicitHeight
      
              color: "lightsteelblue"
          }
      
          Text {
              id: txt
              width: 200
              height: 300
      
              anchors.centerIn: parent
      
              textFormat: Text.RichText
              wrapMode: Text.Wrap
      
              text: "this is some wrapped text that wraps at the image <img src=\"http://qt-project.org/_/images/qt_logo.png\"/> then wraps again after a bit"
          }
      }
      

      Attachments

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

        Activity

          People

            denexter Andrew den Exter (closed Nokia identity) (Inactive)
            denexter Andrew den Exter (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes