I'm using Python (the latest one with PyQt5) In my screen I have 30 labels and their names are label_01 to label_30. I want to change the text of several labels based on some logic.
The labels that I want to change are kept in a list of strings (names of the labels) For instance lets assume the my logic selected these labels: label_13, label_16, label_28
The question Since the list of the labels is dynamic, how can I change the labels in loop that based on the list?
I can do this: self.label_1.setText('Command sent..') But how can I pass the label name as parameter instead of "label_1"
Thank you Eyal