diff --git a/astrodatagui/AstrodataGUI.py b/astrodatagui/AstrodataGUI.py index a490d34..6d9fac0 100644 --- a/astrodatagui/AstrodataGUI.py +++ b/astrodatagui/AstrodataGUI.py @@ -11,6 +11,9 @@ class AstrodataGUI(QtWidgets.QMainWindow): classFileDir = os.path.dirname(os.path.abspath(__file__)) absUiFilePath = os.path.join(classFileDir, "astrodatagui.ui") uic.loadUi(absUiFilePath, self) + + self.actionExit.triggered.connect(self.actionExitTriggered) + self.show() self.loadDB() @@ -25,4 +28,10 @@ class AstrodataGUI(QtWidgets.QMainWindow): def showErrorMessage(self, title: str, msg: str): print(title) - print(msg) \ No newline at end of file + print(msg) + + def actionExitTriggered(self): + for starDB in StarDB.getAllInstances(): + starDB.close() + + exit() \ No newline at end of file