Remove row while model (QSqlRelationalTableModel) is dirty
-
I add a new row in my model (QSqlRelationalTableModel).
So, it's dirty (model ->dirty returns true) . (EditStrategy is OnManualSubmit)If I want to cancel the new record and delete it from the model while it is dirty, what should I do?
I tried:
model->removeRow(model->rowCount());
but fails, the row is not removed from model.