diff options
Diffstat (limited to 'sources/pyside6/tests/QtWidgets/bug_728.py')
-rw-r--r-- | sources/pyside6/tests/QtWidgets/bug_728.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sources/pyside6/tests/QtWidgets/bug_728.py b/sources/pyside6/tests/QtWidgets/bug_728.py index 9e1473635..4d1b37593 100644 --- a/sources/pyside6/tests/QtWidgets/bug_728.py +++ b/sources/pyside6/tests/QtWidgets/bug_728.py @@ -41,6 +41,8 @@ from PySide6.QtCore import QDir, QTimer # Periodically check for the file dialog to appear and close it dialog = None + + def timerHandler(): global dialog if dialog is not None: @@ -48,10 +50,11 @@ def timerHandler(): else: for widget in QApplication.topLevelWidgets(): if isinstance(widget, QDialog) and widget.isVisible(): - dialog = widget + dialog = widget + app = QApplication([]) -QTimer.singleShot(30000, app.quit) # emergency +QTimer.singleShot(30000, app.quit) # emergency timer = QTimer() timer.setInterval(50) timer.timeout.connect(timerHandler) |