aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicktextinput/data/checkCursorDelegateWhenPaddingChanged.qml
diff options
context:
space:
mode:
authorWang Chuan <ouchuanm@outlook.com>2021-04-05 11:41:48 +0800
committerWang Chuan <ouchuanm@outlook.com>2021-04-19 19:06:19 +0800
commitca5d6cccde1f977eedb46f3320fe8384ea41758e (patch)
treea67fa1a6e7f60e1a31fbe8023a19d4ccc04e5936 /tests/auto/quick/qquicktextinput/data/checkCursorDelegateWhenPaddingChanged.qml
parent057972edc90da80252764e1b3abb71e1e6ab0191 (diff)
QQuickTextInput: update cursor rectangle after padding changedv5.12.115.12.11
The position of cursor delegate needs to be updated when we change padding, otherwise it will be in a wrong position. Fixes: QTBUG-91867 Change-Id: I89ca84fe893ebf517ab67890196eede14a4055d7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit d98694c4023881673259ba040c10df7e71ec3d37)
Diffstat (limited to 'tests/auto/quick/qquicktextinput/data/checkCursorDelegateWhenPaddingChanged.qml')
-rw-r--r--tests/auto/quick/qquicktextinput/data/checkCursorDelegateWhenPaddingChanged.qml16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicktextinput/data/checkCursorDelegateWhenPaddingChanged.qml b/tests/auto/quick/qquicktextinput/data/checkCursorDelegateWhenPaddingChanged.qml
new file mode 100644
index 0000000000..e6f07b4687
--- /dev/null
+++ b/tests/auto/quick/qquicktextinput/data/checkCursorDelegateWhenPaddingChanged.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.12
+
+Rectangle {
+ width: 200
+ height: 200
+ TextInput {
+ objectName: "textInput"
+ leftPadding: 10
+ focus: true
+ cursorDelegate: Rectangle {
+ objectName: "cursorDelegate"
+ width: 5
+ color: "red"
+ }
+ }
+}