The question is how to update TableView?I don't use MVC pattern!There should be some method for doing this.
The question is how to update TableView?I don't use MVC pattern!There should be some method for doing this.
QSqlQueryModel is read only: you cannot update the data through the model and the model has no way to know if the data underneath it has been changed externally. If you want to update the data through the model (using the table directly or a dialog that uses the model) then you want a QTableModel or similar. If you only want to refresh the read-only table because you know the underlying data has changed then call setQuery() again.
Thank you! I just made a new slot with the query and i trigger it whenever i need an update.
Bookmarks