On Tuesday, June 2, 2015 at 4:13:27 PM UTC+2, Laura Creighton wrote: > In a message of Tue, 02 Jun 2015 06:09:34 -0700, Alexis Dubois writes: > >Hello ! > > > >I have this kind of message every time I quit my PyQt4 app whatever the > >method to quit is: a quit action menu, the windows "red cross", by quit(), > >close(), destroy(), deletelater(), ... > > > >"python.exe has stopped working" > >->Check online for a solution > >->Close the program > > > >I need to specify that the app is working nice, just have this message when > >quit. > >Do you have an idea to help me understand this issue? > > > >Thanks in advance > >Best regards > >Alexis > >-- > >https://mail.python.org/mailman/listinfo/python-list > > You can override closeEvent > > def closeEvent(self, event): > QtGui.qApp.quit() > event.ignore() > > This just shuts it up, you may have more complicated things you want to do. > > Laura
Thanks Laura, Unfortunately, my closeEvent is already override as this: def closeEvent(self, event): reply = QtGui.QMessageBox.question(self, 'Message', "Are you sure to quit HWL?", QtGui.QMessageBox.Yes | QtGui.QMessageBox.No, QtGui.QMessageBox.No) if reply == QtGui.QMessageBox.Yes: app.quit() else: event.ignore() Replacing app.quit() by QtGui.qApp.quit() doesn't change anything. -- https://mail.python.org/mailman/listinfo/python-list