def closeEvent(self, event):
reply = QtGui.QMessageBox.question(self, '<STR_LIT>',<EOL>"<STR_LIT>", QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)<EOL>if reply == QtGui.QMessageBox.Yes:<EOL><INDENT>event.accept()<EOL><DEDENT>else:<EOL><INDENT>event.ignore()<EOL><DEDENT>
The following asks to the user if he is sure to quit the GUI.