1 Attachment(s)
Problems with databases in QT.
(Sorry i dont speak english, im using google translator)
I am testing a program of the book "C + + programming with QT" and I have problems when i try to add a song to a cd, the changes are not saved, do not understand why, changes in the database are not saved. I hope your help, thank you very much!
Re: Problems with databases in QT.
In your code the trackModel->editStrategy() is QSqlTableModel::OnRowChange. Changes are not written to the database until you select a different row (or call submitAll()). If there is no other row to select then the data is not committed. The row header for the new row has "*" until it is committed.
I also see run time warnings:
if I try to force the new track (at row 0 not 1) to commit by adding another track.