I was wondering what the "most" correct way to refresh a QTableView using a QSqlQueryModel would be when the result of the query would change?
I'm aware that:
1) QSqlQueryModel ::setQuery can be called but why should I parse a new query just to refresh it?
2) QTableView::setModel can be used but why should I set a new model only to refresh it?
3) QSqlQueryModel ::reset can be used but this is a protected method and would completely reset the model including information about the header line etc.
The model/view architecture of Qt seems to have a very complex and well documented architecture but I just cannot seem to find the "correct" way to do this.
Thank you,
D
Bookmarks