Skip to content

Commit

Permalink
close #4135
Browse files Browse the repository at this point in the history
PyQt 5.15 needs the event manager to be called bewteen the window hide / show else the window will never be displayed.
  • Loading branch information
payno authored Oct 14, 2024
1 parent b24be7a commit 054c497
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/silx/gui/plot/tools/profile/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 054c497

Please sign in to comment.