【发布时间】:2016-12-16 12:44:13
【问题描述】:
正如我在标题中提到的。我该怎么做?
class Main(QWidget):
def __init__(self):
super().__init__()
def StartButtonEvent(self):
self.test = ExecuteThread()
self.test.start()
def MyEvent(self):
#MainThreadGUI
class ExecuteThread(QThread):
def run(self):
# A lot of work
# Signal to main thread about finishing of job = mainthread will perform MyEvent
我在这里找到了一些教程pyqt4 emiting signals in threads to slots in main thread
这里是Emit signal from pyQt Qthread
但它似乎在 PyQt5 中不起作用:/
【问题讨论】: