Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.8.4, 5.0.0 RC 2
-
None
Description
A mouse press outside the text input in the example below changes the text from "aaaa" to the wider "WWWW", when this happens the cursorRectangle should be updated so that it remains positioned at the end of the text rather than somewhere in the middle of the expanded text as happens now.
import QtQuick 2.0 Rectangle { id: root width: 480; height: 480 MouseArea { id: mouseArea anchors.fill: parent hoverEnabled: true } Rectangle { anchors.fill: textInput anchors.margins: -10 color: "lightsteelblue" } TextInput { id: textInput anchors.centerIn: parent width: 300 text: mouseArea.pressed ? "WWWW" : "aaaa" focus: true cursorDelegate: Rectangle { color: "yellow" width: 2 } } }
Attachments
For Gerrit Dashboard: QTBUG-28677 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
43209,1 | Ensure the cursorRectangle is updated as the width of the text changes. | stable | qt/qtdeclarative | Status: MERGED | +2 | 0 |