Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 [split] What is a GUI's mainloop ?
what exactly is mainloop for? What is it´s purpose?
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.

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  [Tkinter] Is mainloop() necessary? escape_freedom13 2 3,518 Sep-01-2019, 02:49 PM
Last Post: escape_freedom13
  [Tkinter] sleep(n) not working inside tkinter mainloop roger31415 2 1,487 Jul-14-2019, 06:57 PM
Last Post: wuf
  [Tkinter] ttk.barprogress - root.mainloop francisco_neves2020 11 1,749 Apr-10-2019, 01:06 PM
Last Post: francisco_neves2020
  [Tkinter] How to update the gui in a loop without blocking the gui mainloop Qnuba 2 46,454 Nov-12-2016, 04:33 PM
Last Post: Qnuba

Forum Jump:

Users browsing this thread: 1 Guest(s)