Emitting signals from a Python thread using QObject
问题 I would like to know what are the consequences of emitting a signal from a regular python thread within a QObject, compared with a QThread. See the following class: class MyObject(QtCore.QObject): def __init__(self): super().__init__() sig = pyqtSignal() def start(self): self._thread = Thread(target=self.run) self._thread.start() def run(self): self.sig.emit() # Do something Now, assuming that in the GUI thread, I have: def __init__(self): self.obj = MyObject() self.obj.sig.connect(self.slot)