Fix #7 with exception handler.

This commit is contained in:
parouby committed 2025-03-06 09:18:04 +01:00
1 parent b80e0f3c8e
commit 4af3c4c9ea
1 file changed
+9 -1
+9 -1
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")