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

TextInput cursorDelegate position not updated after left padding change

    XMLWordPrintable

Details

    • All
    • d98694c4023881673259ba040c10df7e71ec3d37 (qt/qtdeclarative/dev) 84fd42a91314b04448931dd1473eef7a9b5c3931 (qt/qtdeclarative/6.1) 9d426d0f0352808d04d8e97f97cea668e3f0bba4 (qt/qtdeclarative/6.0) b7f46486ac (qt/tqtc-qtdeclarative/5.15-opensource)

    Description

      When I use a cursorDelegate for a TextInput item, and I change the left padding after component creation, the cursor position does not change.

      The issue does not occur if I use the default TextInput cursor.

      Here is a piece of code to reproduce the issue. Click on the green rectangle to change left padding : nothing occur about the cursor. Now comment out the cursorDelegate line and click again on the green rectangle : the cursor position changes.

          Rectangle {
              width: 150; height: 50; border.width: 1
              TextInput {
                  id: textInput
                  anchors.fill: parent
                  anchors.margins: 4
                  focus: true
                  leftPadding: 10
                  cursorDelegate: Rectangle { width: 2; color: "#00f" }
              }
          }
          Rectangle {
              x: 200; width: 50; height: 50; color: "#4c4"
              MouseArea {
                  anchors.fill: parent;
                  onClicked: textInput.leftPadding = 50
              }
          }
      

      Attachments

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            hadrien Hadrien Nilsson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: