from PyQt5.QtCore import QObject, QThread, pyqtSignal
class Main(QThread):
    def __init__(self):
        pass
    def work(self):
        print('Running.')
        
class Runner():
    def __init__(self):
        self.thread = QThread()
        self.main = Main()
        self.main.moveToThread(self.thread)
        self.thread.started.connect(self.main.work)
        self.thread.start()
        
        

obj = Runner()
obj.__init__()
Yukarıdaki kodda şu hatayı alıyorum:
Alıntı
Traceback (most recent call last):
File "c:UsersadminOneDriveMasaüstüxtry.py", line 20, in <module>
obj = Runner()
File "c:UsersadminOneDriveMasaüstüxtry.py ", line 13, in __init__
self.main.moveToThread(self.thread)
RuntimeError: super-class __init__() of type Main was never called