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

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

XMLWordPrintable

      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.

        1. final.gif
          final.gif
          219 kB
        2. ideal.gif
          ideal.gif
          230 kB
        For Gerrit Dashboard: QTBUG-118629
        # Subject Branch Project Status CR V

            inho Inho Lee
            luqiaochen Luqiao Chen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                There are 2 open Gerrit changes