[Interest] Updating view after cached sql delete

Mark Brand mabrand at mabrand.nl
Sat Dec 14 14:54:51 CET 2013

On Friday 13 December 2013 22:47:18 Knut Krause wrote:
> Hi,
> I'm showing my QSqlTableModel in a QTableView. I've set the submit policy to
> ManualSubmit. If I delete a row from my model the view keeps a blank row
> with an exclamation mark as index. Can I somehow remove this row?
> I tried
> connect(model, SIGNAL(beforeDelete(int)), view, SLOT(hideColumn(int)));
> but this doesn't seem to work. How would you do this?

I think you meant hideRow(), right? But I'm not sure it's a good idea to hide 
the row before the DELETE operation. Suppose the delete fails.

When you call select(), the query will be run again, the edit cache cleared, 
and  the model will be reset.


More information about the Interest mailing list