So I'm adding checkboxes from a list in PyQt4. But I can't figure a way to use stateChanged for each one of them in my Window class.
This is the function to add them from the list elements:
def addCheckbox(self):
colunas = Graphic(self.caminho).getColunas()
for col in colunas:
c = QtGui.QCheckBox(col, self, objectName=col)
self.layout.addWidget(c)
I've tried to get their object names in a while True
and use with:
self.name.stateChanged.connect(self.clickBox)
but that just freezes the code.
How do I do that? Thank you for your time c:
Aucun commentaire:
Enregistrer un commentaire