Qt 6.12 LTS is out! See what's new in the release
blog
update()
-
how can i update data in table view when data on database changed ? Plz, help me.
I use QSqlQueryModel@Duy-Khang
Depends on whether by "when data on database changed" you mean you change it from within the same Qt program or you mean by some other external application.https://forum.qt.io/topic/91259/how-to-refresh-qsqlquerymodel mentions a couple of methods to refresh/rerun the query, if that is what you want to do manually.
QSqlTableModelwould allow you to update a table from your Qt code, and would "see" any changes done that way and bring the view back up to date.