I have a TableView and I create a QSqlQueryModel and then set the the table. All that works well and good.
From another class, I look at a record of the model based on the index.
If a certain value is null, then I give it a value like so:
// int rowIndex is passed
QString Image_Set_ID
= "some value";
qvImage_Set_ID.setValue(Image_Set_ID);
((QSqlQueryModel*)(tableView
->model
()))->record
(rowIndex
).
setValue("Image_Set_ID", qvImage_Set_ID
);
// int rowIndex is passed
QString Image_Set_ID = "some value";
QVariant qvImage_Set_ID;
qvImage_Set_ID.setValue(Image_Set_ID);
((QSqlQueryModel*)(tableView->model()))->record(rowIndex).setValue("Image_Set_ID", qvImage_Set_ID);
To copy to clipboard, switch view to plain text mode
But then if I look at the record from the model of the tableView again, it isn't updated.
Thanks,
Sean
What is missing?
Bookmarks