我需要使用QThreads发出自己的信号,但它仍然不起作用。这是我的线程类:
class Thread(QThread):
startDestroy = Signal()
def __init__(self):
super(Thread, self).__init__()
def run(self):
self.startDestroy.emit()
需要发出信号startDestroy:
我的主要课程:
class MainForm(QDialog, Ui_Dialog):
def __init__(self):
super(MainForm, self).__init__()
.
.
.
self.thread = Thread()
def setupSignals(self):
.
.
.
self.thread.startDestroy.connect(self.strDestroy)
我只得到这个错误,我不知道为什么:
self.thread.startDestroy.connect(self.strDestroy) AttributeError: 'builtin_function_or_method' object has no attribute 'startDestroy'
目前没有回答
相关问题 更多 >
编程相关推荐