from PySide2.QtCore import QObject, Signal, Slot, QThread, QTimer from PySide2.QtWidgets import QApplication class ThreadPrinter(QObject): def __init__(self): QObject.__init__(self) # 'sig' is assigned outside of __init__ self.sig.connect(lambda: print('Never called.')) def undecorated_print_thread(self): print(f'Current: {QThread.currentThread()}') @Slot() def decorated_print_thread(self): print(f'Current: {QThread.currentThread()}') class Signaller(QObject): sig_undecorated = Signal() sig_decorated = Signal() def __init__(self): QObject.__init__(self) self.thread = QThread() self.thread_printer = ThreadPrinter() self.thread_printer.moveToThread(self.thread) self.thread.start() self.sig_decorated.connect(self.thread_printer.decorated_print_thread) self.sig_undecorated.connect(self.thread_printer.undecorated_print_thread) def run(self): print(f'Main thread: {QApplication.instance().thread()}') # Trigger ThreadPrinter.decorated_print_thread self.sig_decorated.emit() # Trigger ThreadPrinter.undecorated_print_thread self.sig_undecorated.emit() if __name__ == '__main__': app = QApplication() ThreadPrinter.sig = Signal() signaller = Signaller() timer = QTimer.singleShot(0, signaller.run) app.exec_()