2
I have a problem and I can’t identify the mistake.
I am creating a dynamic table in Python where it will be filled with database information. The problem is the code is repeating the first line of the sql query:
# Cria tabela
def tabela(self,li,sql):
item = QTableWidgetItem
col = 5 #será fixa
self.dlg.tabela.setRowCount(li)
self.dlg.tabela.setColumnCount(col)
self.dlg.tabela.setRowHeight(0,1) # Primeira linha
for l in range(1,li):
c=0
for resp in sql:
self.dlg.tabela.setItem(l, c, item(resp))
c+=1
Repeats the first line. How to solve?
2- FP12| N1 |PMU Memorial JK| AO LADO DO MEMORIAL JK| ESC DA
3- FP12| N1 |PMU Memorial JK| AO LADO DO MEMORIAL JK| ESC DA