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

QML TextInput places its text out of boundary if cursorDelegate is set.

    XMLWordPrintable

Details

    Description

      Reproducer (Rectangle is simply for better visibility):

      Window {
          width: 400
          height: 300
          visible: true
      
          Rectangle {
              border.color: "black"
              width: 200
              height: 40
      
              TextInput {
                  anchors.fill: parent
                  clip: true
                  cursorVisible: true
                  cursorDelegate: Rectangle {
                      width: 10
                      height: 40
                      color: "gray"
                  }
              }
          }
      }
      

      Input some text into TextInput until it reaches the end of its width, then one can see that cursor is out of boundary on right side. And if one moves cursor back to the beginning of text, it can be observed that text is "pushed" out of boundary. How far does the text go equals the width of cursorDelegate.

      Attachments

        Issue Links

          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
              luqiaochen Luqiao Chen
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes