QTableView refresh problem
Hi;
How can refresh TableView after remove a row.
Code:
model->removeRow(row);
delete row from model but data stay on the TableView
if use select() again before submitAll() to disappear new inserted record
how can refresh it.
Please help... :confused:
Re: QTableView refresh problem
What kind of model did you use? QSqlQueryModel is read-only - you can't remove rows from it. If you implemented removeRows() yourself, you have to use beginRemoveRows() and endRemoveRows() to make sure views get refreshed.
Re: QTableView refresh problem
I understand the problem...
[HTML]http://lists.trolltech.com/qt-interest/2005-09/thread00510-0.html[/HTML]
but now, i have another problem;
how can learn record state (inserted, updated or deleted) from QSqlTableModel
thank you...
Re: QTableView refresh problem
What do you mean by "record state"? If you submit all changes to the model, operations will be comitted and your model will get updated.