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

[REG 5.11.2 -> 5.12] TextArea's initialization with long text bug

    XMLWordPrintable

Details

    • Windows
    • ff30fc5f5f637da6a06a33ae0e55d5e4b798099d (qt/qtquickcontrols2/5.12)

    Description

      Steps to reproduce:

      • run the following qml
      • click on text area
      • mouse wheel to scroll the text doesn't work
      • press & hold the down key - blank lines on the middle and bug on the end

      If you click "Add empty line", then it works fine.

      The bug reproduces without "TextArea.clip: true", but less obviously.

       

      import QtQuick 2.11
      import QtQuick.Controls 2.4
      import QtQuick.Layouts 1.3
      import QtQuick.Window 2.2
      
      ApplicationWindow {
          id: appWindow
      
          width: 500
          height: 400
          visible: true
      
          ColumnLayout {
              anchors.fill: parent
      
              Button {
                  text: "Add empty line"
                  onClicked: {
                      textArea.text += "\n";
                  }
              }
      
              ScrollView {
                  Layout.fillWidth: true
                  Layout.fillHeight: true
      
                  TextArea {
                      id: textArea
                      clip: true
                      persistentSelection: true
                      selectByMouse: true
      
                      font.pointSize: 16
                      text: {
                          var s = "";
                          for (var i = 1; i < 30; ++i) {
                              s += i + "\n";
                          }
                          return s;
                      }
                  }
              }
          }
      }
      

       

      Attachments

        For Gerrit Dashboard: QTBUG-72536
        # Subject Branch Project Status CR V

        Activity

          People

            richard Richard Moe Gustavsen
            nodir.temir Nodir Temirkhodjaev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes