diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2025-10-21 16:23:08 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2025-10-23 10:36:21 +0200 |
| commit | 88bff187d4c20837e011d342bc7a4691b71c649c (patch) | |
| tree | 3428825b5fbb77699f7d2dad54ac7eff0085cf27 /sources/pyside6/tests/QtWidgets/qwidget_test.py | |
| parent | 049174c185e6cb8f9157c93f1ccc39a90f38ad88 (diff) | |
Fix tests using the Wayland platform plugin
Remove the loop ensuring the window is mapped introduced by
918cd72f5eaebf56287a5ab0ac2e149ba1617a57, since on Wayland, the paint
event occurs there, causing a hang. This loop is usually used to
ensure a window is in a deterministic state for playing mouse events,
etc, but for paint events it should not be required.
Skip the native event test for Wayland, too.
Change-Id: I2b44dc098873614e2b8d9bc54444917fd4905e9f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside6/tests/QtWidgets/qwidget_test.py')
| -rw-r--r-- | sources/pyside6/tests/QtWidgets/qwidget_test.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sources/pyside6/tests/QtWidgets/qwidget_test.py b/sources/pyside6/tests/QtWidgets/qwidget_test.py index 28c189e16..c1ff43b55 100644 --- a/sources/pyside6/tests/QtWidgets/qwidget_test.py +++ b/sources/pyside6/tests/QtWidgets/qwidget_test.py @@ -12,6 +12,7 @@ from init_paths import init_test_paths init_test_paths(False) from PySide6.QtWidgets import QWidget, QMainWindow +from PySide6.QtGui import QGuiApplication from helper.usesqapplication import UsesQApplication @@ -47,10 +48,10 @@ class QWidgetVisible(UsesQApplication): widget.setVisible(True) self.assertTrue(widget.isVisible()) self.assertTrue(widget.winId() != 0) - # skip this test on macOS since no native events are received - if sys.platform == 'darwin': + # skip this test on macOS/Wayland since no native events are received + if sys.platform == 'darwin' or QGuiApplication.platformName() == 'wayland': return - for i in range(10): + for i in range(100): if widget.nativeEventCount > 0: break self.app.processEvents() |
