mirror of
https://forgemia.inra.fr/theophile.terraz/acoused.git
synced 2026-10-30 03:10:40 +01:00
Mainwindow: Fix #7 sqlitebrowser call with QProcess.
This commit is contained in:
1 parent
dc9264cd65
commit
769fd8581e
1 file changed
+16
-2
+16
-2
@@ -39,7 +39,7 @@ from View.about_window import AboutWindow
|
|||||||
import settings as stg
|
import settings as stg
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from subprocess import check_call, run
|
from subprocess import run
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
@@ -269,7 +269,21 @@ class Ui_MainWindow(object):
|
|||||||
cc_kt.exec()
|
cc_kt.exec()
|
||||||
|
|
||||||
def db_browser_for_sqlite(self):
|
def db_browser_for_sqlite(self):
|
||||||
check_call("/usr/bin/sqlitebrowser")
|
proc = QtCore.QProcess()
|
||||||
|
if stg.filename_save_as != "":
|
||||||
|
print(f"Set working directory to: '{stg.filename_save_as}'")
|
||||||
|
proc.setWorkingDirectory(
|
||||||
|
os.path.dirname(stg.filename_save_as)
|
||||||
|
)
|
||||||
|
|
||||||
|
proc.start("sqlitebrowser", [])
|
||||||
|
proc.waitForFinished()
|
||||||
|
|
||||||
|
if proc.exitCode() != 0:
|
||||||
|
print(f"'sqlitebrowser' return with error code : {proc.exitCode()}")
|
||||||
|
print("-error------")
|
||||||
|
print(f"{proc.readAllStandardError()}")
|
||||||
|
print("------------")
|
||||||
|
|
||||||
def about_window(self):
|
def about_window(self):
|
||||||
print("about")
|
print("about")
|
||||||
|
|||||||
Reference in new issue
Block a user