Python Forum
[split] What is a GUI's mainloop ? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/Forum-Python-Coding)
+--- Forum: GUI (https://python-forum.io/Forum-GUI)
+--- Thread: [split] What is a GUI's mainloop ? (/Thread-split-What-is-a-GUI-s-mainloop)



[split] What is a GUI's mainloop ? - kom2 - May-04-2019

what exactly is mainloop for? What is it´s purpose?


RE: [split] What is a GUI's mainloop ? - Yoriz - May-04-2019

The mainloop is a infinite loop that runs until no windows are open anymore.
It is responsible for the drawing of the widgets and checking for events like button clicks.
If the mainloop is interrupted by long running code or a time.sleep the GUI widgets wont get redrawn,
the GUI will lockup and no events can happen.