PyQt5 designer gui and iterate/loop over QPushButton [duplicate]
问题 This question already has answers here : Python 'called with the wrong argument type' error (1 answer) Set properties of multiple QLineEdit using a loop (3 answers) Closed 9 months ago . Hi I have a GUI with 26 QPushButtons named A to Z, using uicload I load into my Main class is there any way to loop over them to end up with something self.A.clicked.connect(self.foo(A)) # .. self.Z.clicked.connect(self.foo(Z)) tried different ways but I end up always with either a syntax error or a