[Qt-interest] How to cleanup SqlTableModel ?
KC Jones
kc at asperasoft.com
Thu Oct 29 21:52:31 CET 2009
> After the rows are loaded, how can I just remove a row from the model
> without remove from database?
Not supposed to work that way, as far as I understand.
You could use the setFilter() mechanism and use your primary key to
exclude specified records, as in setFilter("NOT id IN(...)"); but that
is pretty ugly. And any views associated with the model will lose
their selection sets unless you manually recreate them.
More information about the Qt-interest-old
mailing list