From 054c497aa63d2f6086c21a749b555dba25b00332 Mon Sep 17 00:00:00 2001 From: payno Date: Mon, 14 Oct 2024 10:49:28 +0200 Subject: [PATCH] close #4135 PyQt 5.15 needs the event manager to be called bewteen the window hide / show else the window will never be displayed. --- src/silx/gui/plot/tools/profile/manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/silx/gui/plot/tools/profile/manager.py b/src/silx/gui/plot/tools/profile/manager.py index 6f4ba358ef..8ed2eae981 100644 --- a/src/silx/gui/plot/tools/profile/manager.py +++ b/src/silx/gui/plot/tools/profile/manager.py @@ -1055,9 +1055,11 @@ def initProfileWindow(self, profileWindow, roi): # Trick to avoid blinking while retrieving the right window size # Display the window, hide it and wait for some event loops + eventLoop = qt.QEventLoop(self) profileWindow.show() + # Handle PyQt 5.15. Fix issue #4135 + eventLoop.processEvents() profileWindow.hide() - eventLoop = qt.QEventLoop(self) for _ in range(10): if not eventLoop.processEvents(): break