mardi 14 septembre 2021

How to check if a checkbox in Qtablewidget is checked?

I have this script that filters some unwanted words inside a text file. It displays a GUI that will promt a tablewidget with some checkbox in it but I have a problem checking when a checkbox is checked.

I've tried some ways like this function inside my class but it doesn't seem to work.

The Function I Tried but this returns either None or NoneType error:

def _checkBoxcheck(self):
    print("_checkBoxcheck")
    for row in range(self.rowCount()):
        print(self.cellWidget(1, 1))
        if not self.cellWidget(1, 1) is None:
            if self.cellWidget(row, 1).isChecked():

picture of whole script if needed,(I'm having a hard time pasting the code so i just took a screenshot of it) The Whole Script's Picture




Aucun commentaire:

Enregistrer un commentaire