Hello smart people.

Got an interesting little problem here. I'm using QSqlTableModel (subclassed) and need to validate new records before they are committed. So, I use the beforeInsert signal and inspect the record - if it fails my validation then I need to cancel the insert.

I would have though that calling revertAll() would accomplish this, but it has an unfortunate side effect of core dumping. Hmmmm.

Sorry, no useful back trace - top of stack is QSqlTableModel::submitAll()

I'm using setEditStrategy(QSqlTableModel::OnManualSubmit) and using MySql 5.0

Any idea how to cancel inserts using this signal? I'd prefer not to trawl through the model's records and remove() on the last one - seems a bit ugly.

Hope you can help!