PDA

View Full Version : QSql Model-View: How to keep view in sync with model



schall_l
22nd December 2008, 23:08
Hi,

I would like to do the following:

One part of my application is using QSqlQuery to store datas in a database.
An other part of my application is using QSqlTableModel to view the datas stored in the database.

How can I get the view to be refreshed automatically when datas have been updated in the database (so that the view always show the live content of the database)?

Thank you

wysota
23rd December 2008, 00:31
Unless you are using a database that supports notifications (like PostgreSQL), you have to take care about it manually.