Storing Changes from TableView to Model to SQLITE Database
After reading the Qt documentation and playing around with some code I am still a bit confused as to what each part of my code that stores changes to my database actually does. I have the following code:
I am unsure as to whether all three of these calls are necessary to save the changes to my persistent database. In leyman's terms what exactly does transaction() do? Instead of calling submitAll() can I just go straight to commit()?
You really should not need all of these calls. One of these should be sufficient:
The "QSqlTableModel":http://qt-project.org/doc/qt-5.0/qtsql/qsqltablemodel.html should be already pointing to your database.