[pyqt] how QSqlQueryModel insert a record and update view?
-
scenario: I wanna to fetch data from online, and display data with tableview, save data at the same time. Provided I adopt the
QSqlQueryModelapproach, everytime I get a new record from online, I need tosetQuery()to refresh the tableView. If the records amount a lot,setQuery()will result in repainting over and over again, which will deteriorate the performance of GUI responsiveness.why
QSqlQueryModel? because the data will be read from joint tables and written respectively.so any better idea to refresh the view synchronizedly?