这里的问题很简单:您
SimulRunner永远不会收到使它开始工作的信号。一种方法是将其连接到
started线程的信号。
另外,在python中,您应该使用新型的信号连接方式:
...self.simulRunner = SimulRunner()self.simulThread = QThread()self.simulRunner.moveToThread(self.simulThread)self.simulRunner.stepIncreased.connect(self.currentStep.setValue)self.stopButton.clicked.connect(self.simulRunner.stop)self.goButton.clicked.connect(self.simulThread.start)# start the execution loop with the thread:self.simulThread.started.connect(self.simulRunner.longRunning)...



