Skip to content

test: fix live preview test closing its dialog on Qt 6 - #373

Merged
PierreRaybaut merged 1 commit into
developfrom
fix/preview-test-qt6
Oct 5, 2026
Merged

PierreRaybaut merged 1 commit into
developfrom
fix/preview-test-qt6

Conversation

@PierreRaybaut

Copy link
Copy Markdown
Contributor

test_live_image_to_signal_preview fails on the PyQt6 workflow on develop (e.g. run 36858370695) and on PR #372.

The test stopped the application event loop with QApplication.quit(). With Qt 6, quit() also closes every top-level window, so the preview dialog was hidden before plotwidget.isVisible() was checked. QApplication.exit() leaves the loop without closing windows. A local QEventLoop is not an option: with Qt 5, an earlier quit() makes it return immediately.

Verified locally: the original test fails under PyQt6 6.11 exactly as in CI; with the fix, processing_preview_unit_test.py passes under both PyQt5 and PyQt6 (25/25).

Assisted-by: Claude Opus 5.5

QApplication.quit() closes top-level windows with Qt 6; exit() only leaves the loop.

Assisted-by: Claude Opus 5.5
@PierreRaybaut
PierreRaybaut merged commit 651541b into develop Oct 5, 2026
6 checks passed
@PierreRaybaut
PierreRaybaut deleted the fix/preview-test-qt6 branch October 5, 2026 15:03
@ThomasMalletCodra ThomasMalletCodra added this to the V1.4.0 milestone Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants