How i populate QTableWidget from SQLite Query?
Code:
def proximo_alarm(self): self.cur.execute('SELECT * FROM alunos') a = 0 for row in self.cur: b = 0 for item in self.cur[row]: self.tMain.setItem(b, a, nw) b += 1 a += 1
i get this error:
Code:
for item in self.cur[row]: TypeError: 'sqlite3.Cursor' object is unsubscriptable