Mar-23-2020, 08:50 AM
(This post was last modified: Mar-23-2020, 08:51 AM by keegan_010.)
Hi, I am trying to use a for loop to check every row of a table for a certain value and then either add 1 or 0 to a list. I am currently trying:
Thanks in advance.
for row in range(rowPosition): item = self.invoice.item(row, 0) itemText = item.text() if itemText == "value being searched for": test.append(1) else: test.append(0) ##rowPosition is rowCount()When i try this, it just fails, I did try the item function putting a certain row in and that works, but it will not use the row value.
Thanks in advance.