I'm working with PyQt6. I've set up a grid layout of a bunch of different labels called b0, b1...b6...d1... I have a letter dictionary that is edited whenever I input a word
self.b0 = QLabel(self) etc...
letter_dict = {'b':3,'c':3,'d':3,'f':3,'g':3,'h':3,'k':3,'l':3,'m':3,'n':3,'p':3,'r':3,'s':3,'t':3,'v':3,'w':3,'y':3}
for letter in letter_dict:
letterposition = letter +str(letter_dict[letter])
print(letterposition)
I want to then update the label called b0, or b1 etc. accordingly.
I tried using self.letterposition.setText(letter) , as that should call self.b0.setText(letter). That doesn't seem to be working. I assume it's something to do with the self. instance interacting with a variable?
This isn't the whole code, but everything else seems to be working.