Fix #7 with exception handler.

dev-brahim
Pierre-Antoine 2025-03-06 09:18:04 +01:00
parent b80e0f3c8e
commit 4af3c4c9ea
1 changed files with 9 additions and 1 deletions

View File

@ -275,7 +275,15 @@ class Ui_MainWindow(object):
cc_kt.exec()
def db_browser_for_sqlite(self):
Popen(f"sqlitebrowser", shell=True)
try:
Popen("sqlitebrowser")
except OSError as e:
msg_box = QtWidgets.QMessageBox()
msg_box.setWindowTitle("DB Browser for SQLite Error")
msg_box.setIcon(QtWidgets.QMessageBox.Critical)
msg_box.setText(f"DB Browser for SQLite Error:\n {str(e)}")
msg_box.setStandardButtons(QtWidgets.QMessageBox.Ok)
msg_box.exec()
def about_window(self):
print("about")