Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

Storing Changes from TableView to Model to SQLITE Database

$
0
0
Hello, 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:     database->pointsTableModel->database().transaction();     if(database->pointsTableModel->submitAll())     {         database->pointsTableModel->database().commit();     } 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()? Thanks,

Viewing all articles
Browse latest Browse all 13965

Trending Articles