我具有此功能,该功能会分配一些指令,然后发出信号。信号工作正常,但是如果我添加一行以更新字典,则发射信号将无法工作。
def do_check(self, d_dict):
newSet= set(d_dict)
oldSet= set(self.L_list)
connected = sorted(list(newSet-oldSet))
disconnected = list(oldSet- newSet)
if connected:
for item in connected:
action = QAction(item, self)
action.setCheckable(True)
self.sigAddAnalyzer.emit(action)
self.connectedAnalyzerList[item] = action # if I remove this line the signal "sigAddAnalyzer" works will.
您认为这是pyqt中的错误吗?
谢谢