aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2022-05-25 15:29:36 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2022-05-27 21:55:36 +0200
commit6d2d4914f884fc1a88382ba5cb6eeeeab272874e (patch)
treeff7657ab5caaa0f1ad49a4b5a6cce89b1f6aa524 /tests
parent8ef0407ddd4c8b7f3e685d8a5316dbcb323badd2 (diff)
QQuickSelectionRectangle: ensure we start the selection where the drag started
We should start the selection in TableView at the position where the user started the drag, and not where the centroid at the time when the dragging gets active (which is an offset equal to the mousePressAndHoldInterval property in QStyleHints). Pick-to: 6.3 6.2 Change-Id: Ibe330d31c1e2c8022006a56b7119b1dcb3e0e5b9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quickcontrols2/controls/data/tst_selectionrectangle.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/quickcontrols2/controls/data/tst_selectionrectangle.qml b/tests/auto/quickcontrols2/controls/data/tst_selectionrectangle.qml
index 437e8ec7f2..210c6594cd 100644
--- a/tests/auto/quickcontrols2/controls/data/tst_selectionrectangle.qml
+++ b/tests/auto/quickcontrols2/controls/data/tst_selectionrectangle.qml
@@ -337,7 +337,7 @@ TestCase {
}
// Drag on the bottom right handle, so that the selection shrinks to cell 1, 1
- mouseDrag(tableView, cellWidth * 2, cellHeight * 2, -cellWidth / 2, -cellHeight / 2, Qt.LeftButton)
+ mouseDrag(tableView, (cellWidth * 3) - 1, (cellHeight * 3) - 1, -cellWidth, -cellHeight, Qt.LeftButton)
compare(tableView.selectionModel.selectedIndexes.length, 1)
verify(tableView.selectionModel.isSelected(tableView.model.index(1, 1)))
}