示例#1
0
文件: main.py 项目: sprout42/vivisect
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()
示例#2
0
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()