且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Python Tkinter 应用程序未正确退出

更新时间:2021-12-31 00:45:54

使用 self.destroy() 你只是在销毁 Frame,而不是顶层容器,你需要做 self.master.destroy() for它正确退出

With self.destroy() you're just destroying the Frame, not the the top level container, you need to do self.master.destroy() for it to exit correctly