Why is PyQt executing my actions three times?
I'm still kind of new to PyQt but I really have no idea why this is happening. I have a Mainwindow that I create like this: class MainWindow(QtGui.QMainWindow): #initialize def __init__(self): #Call parent constructor super(MainWindow, self).__init__() #Load the interface self.ui = uic.loadUi(r"Form Files/rsleditor.ui") #Show the ui self.ui.show() and when I wanted to override the close event with: def closeEvent(self, event): quit_msg = "Are you sure you want to exit the program?" reply = QtGui.QMessageBox.question(self, 'Message', quit_msg, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No) if