Unable to modify QSqlRecord in QSqlRelationalTableModel
Hello,
I am trying to modify a QSqlRecord in a QSqlRelationalTableModel but it does not work.
If I do so and read the data after, I still obtain the old value.
Code:
model
->record
(i_model
).
setValue("param1",
QVariant("TEST"));
cout << model->record(i_model).value("param1").toString().toStdString() << "\n"
If I try the example above, the second line displays the previous value instead of "TEST".
Thank you.
Re: Unable to modify QSqlRecord in QSqlRelationalTableModel
Hi, did you find a solution to this problem?
I have pretty much the same issue right now. I can't modify / set a value for a column that has a relation attached to it. If I remove the relation from the model, it works fine.
My thread is here: http://www.qtcentre.org/threads/2917...-has-relations