def closeEvent(self, event):
     QApplication.quit();
     # Bubble event up:
     event.ignore();
 def exit(self):
     QApplication.quit();