Bottom Page

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

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  [Tkinter] Is mainloop() necessary? escape_freedom13 2 474 Sep-01-2019, 02:49 PM
Last Post: escape_freedom13
  [Tkinter] sleep(n) not working inside tkinter mainloop roger31415 2 612 Jul-14-2019, 06:57 PM
Last Post: wuf
  [Tkinter] ttk.barprogress - root.mainloop francisco_neves2020 11 1,091 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 35,154 Nov-12-2016, 04:33 PM
Last Post: Qnuba

Forum Jump:


Users browsing this thread: 1 Guest(s)