I have list of check box objects which was created dynamically (runtime). Now how can i set signal check for all these objects in runtime? I'm using pyqt4 for developing. i tried 'for loop' with objects, but signal check is set only to last object of that list. But i need to set signal check for all objects.
obj = widget()
count = 0
while(count<4):
self.listOfObjs.append(QtGui.QCheckBox(obj.gridFrame))
obj.gridLayout.addWidget(self.listOfObjs[count], count, 1)
count = count + 1
for i in listOfObjs:
i.stateChanged.connect(self.change)
def change():
*****DO NECCESSARY THINGS*****