Mainwindow: Revert 'sqlitebrowser' QProcess to Popen (run as async).
parent
9c5b76e451
commit
3e5ef5d2bc
|
|
@ -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 run
|
from subprocess import Popen
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
@ -269,21 +269,7 @@ class Ui_MainWindow(object):
|
||||||
cc_kt.exec()
|
cc_kt.exec()
|
||||||
|
|
||||||
def db_browser_for_sqlite(self):
|
def db_browser_for_sqlite(self):
|
||||||
proc = QtCore.QProcess()
|
Popen(f"sqlitebrowser", shell=True)
|
||||||
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")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue