我正在尝试在已经建立的应用程序中添加一个PyQt GUI控制台。但是PyQt GUI会阻塞整个应用程序,导致无法完成其他工作。我尝试使用QThread,但是它是从mainWindow类调用的。我想要的是在单独的线程中运行MainWindow应用程序。
def main()
app = QtGui.QApplication(sys.argv)
ex = Start_GUI()
app.exec_() #<---------- code blocks over here !
#After running the GUI, continue the rest of the application task
doThis = do_Thread("doThis")
doThis.start()
doThat = do_Thread("doThat")
doThat.start()
我的应用程序已经使用Python线程,因此我的问题是,以线程形式实现这个过程的最佳方法是什么。