I've done the same like this: QtGui.qApp.quit()
, in your case:
exitAction.triggered.connect(QtGui.qApp.quit())
If error still exists, try overriding closeEvent
like this:
def closeEvent(self, event):
QtGui.qApp.quit()
event.ignore()
I hope this helps.