Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QSqlQueryModel and QTableView
cardfour1 last edited by
I have a sqlite database that is associated with a QSqlQueryModel and TableView. I also have a QTimer that executes the SqlQueryModel every 1-10s to poll the database ( not sure if this is the cleanest solution, but it works). I'm noticing that the database is constantly locked, even if I up the timer to 30 seconds. After reading
some on-line documentation, I decided to call the SqlQuery::finish method after executing the query, this seems
to un-lock the database, but I loose the information stored in my TableViews.
Does anyone know why this is occurring ? Also, is there a better way of updating the TableView if an external event writes to the sqlite database ?