-1

What is the difference between .quit and .destroy on Tkinter, they seem to do the same thing.

khelwood
  • 55,782
  • 14
  • 81
  • 108
kim
  • 3
  • 3
  • 2
    Does this answer your question? [What is the difference between root.destroy() and root.quit()?](https://stackoverflow.com/questions/2307464/what-is-the-difference-between-root-destroy-and-root-quit) – DV82XL Aug 06 '20 at 03:56

1 Answers1

1

.quit() causes mainloop to exit, but doesn't directly cause any widgets to be destroyed. However, if there's no code after calling mainloop then the script exits, and all widgets will be destroyed.

.destroy() will destroy a widget. If you destroy the root window then all other widgets will be destroyed and mainloop will stop.

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685