how do I update the current row in the model?
-
Hi,
Use currentIndex. From there you can extract all the information you need to update the model content.
-
Hi,
I have a model attached to a QTableView. I assume insertRecord() is the way to update records since I can't find updateRecord. How do I find what is the model's row number that is currently selected in the QTableView so I can update it?
@jdent said in how do I update the current row in the model?:
since I can't find updateRecord.
For that part, at the
QSqlRecord
level, it's bool QSqlTableModel::setRecord(int row, const QSqlRecord &values).