Actually, it works to delete rows from code, but the deleted rows still remain visible and the row count of the model does not change. The row is removed from the model only after submitAll() and then the row count is finally also reflecting the correct new count.
As you are also affected by this behaviour, I suggest you have a look at http://bugreports.qt.nokia.com/browse/QTBUG-492; you have also the option to vote to have this issue resolved.
If QSqlTableModel::removeRows (or QAbstractItemModel::removeRow) does not work at all for you, then you have a different issue; in that case feel free to post code to scrutinze.
Cheers
Al_
Bookmarks