Python Pyqt关闭窗口运行,但不运行';行不通
我有一个函数负责关闭我的应用程序。但不知怎的,..quit()并没有关闭窗口。它不会陷入无限循环或类似的情况Python Pyqt关闭窗口运行,但不运行';行不通,python,pyqt,Python,Pyqt,我有一个函数负责关闭我的应用程序。但不知怎的,..quit()并没有关闭窗口。它不会陷入无限循环或类似的情况 def onExit(): QtCore.QCoreApplication.instance().quit sys.exit(app) shutdown = 1 #set the shutdown var to the child process parent.send(shutdown) logProc.join() return
def onExit():
QtCore.QCoreApplication.instance().quit
sys.exit(app)
shutdown = 1
#set the shutdown var to the child process
parent.send(shutdown)
logProc.join()
return
解决了这个问题
app=QtGui.QApplication(sys.argv)
app.exit()