execution timing of the method QWidget.show()

artis.paintre at gmail.com artis.paintre at gmail.com
Wed Jul 8 16:11:55 EDT 2020


I might be wrong but since I have not found anygroup newsgroup dedicated to PyQt5.

My small program is expected to show a window GUI for 4 seconds before changing it, so I naively coded:

"...
...
# codes to set up the GUI
...
F0.show() # F0 being a QMainWindow object
time.sleep(4)
...
# codes to change the GUI set up
...
F0.update() 

"

What happens: The a blank window is displayed, freezes for 4 seconds then second set up is displayed, the original set up is not displayed.

Why is not the original set up displayed? 

Obviously, if I remove the codes for the second set up, and the "time.sleep(4)" instruction, the original set up is displayed immediatly after I launch the execution.


More information about the Python-list mailing list