I made a small desktop application PyQt4 where I insert data into db sqlite3, but when I go to consult the data that was inserted before, they are not on the screen of visualization, only when I leave the application and I go back in to do the query is that the data appears. I can not identify why this is happening, could anyone help me in this case? Below, part of the data insertion code in the DB.
sql_ins_dados_q = "INSERT INTO quinas(concurso,data_sorteio,bola_1,bola_2,bola_3,bola_4,bola_5,arrecadacao,ganhadores_quina,rateio_quina,ganhadores_quadra,rateio_quadra,ganhadores_terno,rateio_terno)
VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?)"
while i < len(trt_htm_q.concursos):
insere_dados_q.cur.execute("PRAGMA synchronous = OFF")
insere_dados_q.cur.execute(sql_ins_dados_q,(trt_htm_q.concursos[i],
trt_htm_q.concursos[i+1],
trt_htm_q.concursos[i+2],
trt_htm_q.concursos[i+3],
trt_htm_q.concursos[i+4],
trt_htm_q.concursos[i+5],
trt_htm_q.concursos[i+6],
trt_htm_q.concursos[i+7],
trt_htm_q.concursos[i+8],
trt_htm_q.concursos[i+9],
trt_htm_q.concursos[i+10],
trt_htm_q.concursos[i+11],
trt_htm_q.concursos[i+12],
trt_htm_q.concursos[i+13]))
i += 14
c += 1
insere_dados_q.conn.commit()
insere_dados_q.cur.close()
insere_dados_q.conn.close()