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

Text cut on 10k+ chars

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 6.4.2
    • None

    Description

      If I set html text in TextEdit which exceed 10000 chars, its cut.

      In the qml-example below only "foo" is shown and text is cut afterwards.

      "bar" is shown suddenly, if I remove "+ 1" in Javascript code. When using TextArea instead of TextEdit, the text is not cut.

      import QtQuick
      
      Rectangle {
          TextEdit {
              id: myTextEdit
              textFormat: Text.RichText
              Component.onCompleted: {
                  let some_html = '<pre>foo\nbar</pre>'
                  // if the "+ 1" is removed, "bar" is shown
                  let append_count = 10000 - some_html.length + 1
                  for (let i=0; i<append_count; i++) {
                    some_html+=' '
                  }
                  myTextEdit.text = some_html
              }
          }
      } 

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            qtackler John Devel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes