Tst_QGestureRecognizer::panGesture set FramelessWindowHint

tst_QGestureRecognizer::panGesture() is flaky as sometimes the gesture
event is being sent before the frame and position has had time to
update. The event then starts in the frame and is not received by the
widget.

Set FramelessWindowHint flag to the widget, to remove the need of
updating its frame position and position.

Fix flakiness on Opensuse 15

Pick-to: 6.9 6.8 6.5
Change-Id: Id88510a91e3ed0d5ff92fdc31422503744448b3e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit is contained in:
Frédéric Lefebvre 2025-01-02 09:04:00 +01:00 committed by Frederic Lefebvre
parent dc8055c914
commit fc0e788d02

View File

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