tst_QGestureRecognizer::swipeGesture set FramelessWindowHint

tst_QGestureRecognizer::swipeGesture() is flaky as sometimes the
gesture event is being sent before the widget's position has
been updated.

The gesture starts in the window frame.

Set flag Qt::FramelessWindowFrame to prevent this from
happening.

Fix flakiness on Opensuse 15

Pick-to: 6.8
Change-Id: I794b022b5a51146ddfa7d6029509c6fa43b9aad6
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 6dc0e593939cbeaeb45392d8daf7fcd90e8cb0f8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Frédéric Lefebvre 2025-01-02 09:14:25 +01:00 committed by Qt Cherry-pick Bot
parent 288ef3479e
commit 829b67074e

View File

@ -257,6 +257,7 @@ void tst_QGestureRecognizer::swipeGesture()
const Qt::GestureType gestureType = Qt::SwipeGesture;
TestWidget widget(GestureTypeVector(1, gestureType));
widget.setWindowTitle(QTest::currentTestFunction());
widget.setWindowFlag(Qt::FramelessWindowHint);
widget.show();
QVERIFY(QTest::qWaitForWindowExposed(&widget));