You should not have to re-implement those events just for a close. here some code that works, generated from qt designer. it opens a main window, with a big button that shows the dialog. dialog has two buttons that accept and reject then closes the dialog.
def reject(self): self.close()
QtCore.QObject.connect(self.cancelButton, QtCore.SIGNAL("clicked()"), Dialog.reject)
def on_backButton_clicked(self):