Hat da wer eine Lösung für?
Code: Alles auswählen
def create_account_grid(self):
accounts = self.controller.datenbank_ansicht(self)
button_content = []
posistions = [(row, column) for row in range(len(accounts)) for column in range(3)]
for pos, accounts in zip(posistions, accounts):
buttons = QPushButton(accounts[0])
buttons.clicked.connect(lambda: self.account_read(accounts[0]))
button_content.append(buttons)
buttons.setMinimumSize(QSize(0, 85))
self.ui.gridLayout_7.addWidget(buttons, *pos)