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

Right aligned TextInput scroll position not updated when width changes.

    XMLWordPrintable

Details

    Description

      The scroll position is maintained relative to the left edge of the TextInput so when the width of the item is increased the text is not moved to fill the space introduced on the right.

      This can be seen by running the example below and moving the cursor position away from the right left side so the text is partially scrolled.

      import QtQuick 2.0
      
      Item {
          width: 800; height: 300
          Rectangle {
              id: main
              width: 160
              height: 200
      
              anchors.centerIn: parent
      
              color: "white"
              border.width: 1
      
              NumberAnimation on width {from: 80; to: 160; duration: 2000; running: true; loops: NumberAnimation.Infinite }
      
              Column {
                  anchors.fill: parent
                  TextInput {
                      width: parent.width
                      focus: true
                      text: "كلمة السركلمة السركلمة السركلمة "
                  }
              }
          }
      }
      

      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