Get value of a tuple with a list
-
Hi,
I have a tuple within a list and I'm trying to get the last value of the tuple which is at index 16. When i runName = self.ui.label_574.setText(data[0][0])
works but when I runAge = self.ui.label_574.setText(data[0][16]
I get this error message setText(self, str): argument 1 has unexpected type 'int'. Please any help on what I'm doing wrong. -
Hi,
I have a tuple within a list and I'm trying to get the last value of the tuple which is at index 16. When i runName = self.ui.label_574.setText(data[0][0])
works but when I runAge = self.ui.label_574.setText(data[0][16]
I get this error message setText(self, str): argument 1 has unexpected type 'int'. Please any help on what I'm doing wrong. -
Hi,
I have a tuple within a list and I'm trying to get the last value of the tuple which is at index 16. When i runName = self.ui.label_574.setText(data[0][0])
works but when I runAge = self.ui.label_574.setText(data[0][16]
I get this error message setText(self, str): argument 1 has unexpected type 'int'. Please any help on what I'm doing wrong. -
@LT-K101 The error is actually self-explanatory: you are trying to set an int where string is expected. You need to convert int to QString.