diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-12-14 03:02:48 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-12-14 03:02:48 +0100 |
commit | 3d0d67ff7867baa4fdaa6f6ad91bbdd9c664468e (patch) | |
tree | cf0406c9f17342f97643e582a15241e0d2393c2b /tests/auto | |
parent | cbb9a1279619f291a90bf75a46219c3c2839d136 (diff) | |
parent | 0425562e14e41b62dc7631c7c02768b8294454d0 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I53a6326a91c2de5a6016df7322df4a6159f2330e
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/controls/data/tst_combobox.qml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml index 2cf71f73..0f1f0bdc 100644 --- a/tests/auto/controls/data/tst_combobox.qml +++ b/tests/auto/controls/data/tst_combobox.qml @@ -1853,4 +1853,20 @@ TestCase { closedSpy.wait() compare(closedSpy.count, 1) } + + function test_comboBoxSelectTextByMouse() { + let control = createTemporaryObject(comboBox, testCase, + { editable: true, selectTextByMouse: true, model: [ "Some text" ], width: parent.width }) + verify(control) + waitForRendering(control) + control.forceActiveFocus() + + // Position the text cursor at the beginning of the text. + mouseClick(control, control.leftPadding, control.height / 2) + // Select all of the text. + mousePress(control, control.leftPadding, control.height / 2) + mouseMove(control, control.leftPadding + control.contentItem.width, control.height / 2) + mouseRelease(control, control.leftPadding + control.contentItem.width, control.height / 2) + compare(control.contentItem.selectedText, "Some text") + } } |