This is entire my code: When I run this code, I get a window like this: Below the buttons, there is a QLabel, and I want when I click on any button, the button’s label will refer to this QLabel, but I get a bunch of confusing errors in the terminal. What’s wrong with my code, help me, thanks. Answer
Tag: qpushbutton
Dynamically creating buttons and assigning click actions
I’m trying to practise by making a Pokedex. I’m trying to dynamically create a list of buttons inside of an OVBoxLayout based on the response from an API call. The list of buttons is generated correctly however, none of the buttons work, code below: The button.clicked.connect() doesn’t appear to be assigning the function to each button, anyone know why this