diff options
author | Igor Bugaev <freedbrt@gmail.com> | 2021-07-07 22:31:20 +0300 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2021-07-12 11:25:28 +0200 |
commit | 625ce7ab513634b8f0b03b29524f2adb464aab00 (patch) | |
tree | a8011d86381b8c94881639edc9c624bc3ee387c4 /tests | |
parent | 2b0c12a66a8e8efea37471c59f1c072beb77c9cd (diff) |
Stabilize tst_QQuickDrawer::Windows::slider(mouse)
Need to wait before and after mousePress for some reason
Change-Id: I34a82341dee48492bb4215ee86887ccfc6afbec0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 6363bc8bfebdedad9f4b871f99c23c9b7b0e8bc7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qquickdrawer/tst_qquickdrawer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/qquickdrawer/tst_qquickdrawer.cpp b/tests/auto/qquickdrawer/tst_qquickdrawer.cpp index 043ddc5ad2..57393d7a6e 100644 --- a/tests/auto/qquickdrawer/tst_qquickdrawer.cpp +++ b/tests/auto/qquickdrawer/tst_qquickdrawer.cpp @@ -1305,11 +1305,15 @@ void tst_QQuickDrawer::slider() const QPoint from(slider->width() - 1, y); const QPoint to(1, y); + QTest::qWait(1); + if (mouse) QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, from); else QTest::touchEvent(window, touchDevice.data()).press(0, from); + QTest::qWait(1); + int distance = qAbs(from.x() - to.x()); for (int dx = delta; dx <= distance; dx += delta) { if (mouse) |