一种方法是
import threadingdef main() app = QtGui.QApplication(sys.argv) ex = Start_GUI() app.exec_() #<---------- pre blocks over here !#After running the GUI, continue the rest of the application taskt = threading.Thread(target=main)t.daemon = Truet.start()doThis = do_Thread("doThis")doThis.start()doThat = do_Thread("doThat")doThat.start()这将使您的主应用程序开始运行,并让您继续执行下面代码中想要做的所有其他工作。



