def startup(css=None): # yea yea.... globals suck... global qapp # the main QApplication global guiq # queue of GUI calls to proxy global ethread # QtThread that consumes guiq global workerq # queue of "worker" calls to proxy # skip startup if already started if isGuiStarted(): print("Returning from startup... already QApplication running") return guiq = e_threads.EnviQueue() workerq = e_threads.EnviQueue() currentThread().QtSafeThread = True qapp = VQApplication(sys.argv) if css: qapp.setStyleSheet( css ) ethread = QEventThread(guiq) ethread.idleadd.connect( qapp.callFromQtLoop ) ethread.start() workerThread()
def startup(css=None): # yea yea.... globals suck... global qapp # the main QApplication global guiq # queue of GUI calls to proxy global ethread # QtThread that consumes guiq global workerq # queue of "worker" calls to proxy guiq = e_threads.EnviQueue() workerq = e_threads.EnviQueue() currentThread().QtSafeThread = True qapp = VQApplication(sys.argv) if css: qapp.setStyleSheet(css) ethread = QEventThread(guiq) ethread.idleadd.connect(qapp.callFromQtLoop) ethread.start() workerThread()