0

I made a groupbox contains many buttons i want to make loop which selects all the buttons inside that groupbox and i make if statment ; if button[number] is clicked.

def set_name():
for i in range(3):
    button_name = "btn_" + str(i)
    if(ui.button_name.clicked):
        print("clicked")
Aymen
  • 1
  • 1
  • "clicked" is not a persistent state, it's a signal. If you meant the *check state*, then use `isChecked()`, otherwise if you want to know *which button* was clicked when calling the function, use `self.sender()`. – musicamante Apr 20 '22 at 17:24

0 Answers0