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

QML TextEdit RichText rendering nested tables fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.3.0 Beta1
    • 5.2.1
    • Quick: Other
    • None
    • Kubuntu 12.04 64bit

      When using a QML TextEdit in RichText mode and having nested table-tags,
      the TextEdit control is not properly repainted when entering text.

      Steps to reproduce:
      1.) create new QtQuick2 project in QtCreator
      2.) set following content in main.qml:

      import QtQuick 2.0
      
      Rectangle {
          width: 360
          height: 360
          TextEdit {
              textFormat: TextEdit.RichText
              text: '<body><table><tr><td><table><tr><td >testtext</td></tr></table>not rendered correctly</td></tr></table></body>'
              anchors.fill: parent
          }
      }
      

      3.) run program
      4.) move cursor to "testtext" in the TextEdit control
      press enter and the line "not rendered correctly" appears two times.
      ( see images before.png and after.png)

      After resizing the window, everything is rendered correctly again.

      Workaround:
      if I change main.qml as follows, rendering works fine:

      import QtQuick 2.0
      
      Rectangle {
          width: 360
          height: 360
          TextEdit {
              textFormat: TextEdit.RichText
              text: '<body><table><tr><td><table><tr><td >testtext</td></tr></table>not rendered correctly</td></tr></table></body>'
              anchors.fill: parent
              onTextChanged: {
                  width++;
                  width--;
              }
          }
      }
      

        1. after.png
          10 kB
          Ludger Krämer
        2. before.png
          10 kB
          Ludger Krämer
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            aalpert Alan Alpert
            lkdem Ludger Krämer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes