[Qt-interest] How to cleanup SqlTableModel ?
jjDaNiMoTh
jjdanimoth at gmail.com
Thu Oct 29 22:40:30 CET 2009
2009/10/29 George Guntensperger <guntensperger at gmail.com>:
> After the rows are loaded, how can I just remove a row from the model
> without remove from database?
>
You can use default functions like [1] with a OnManualSubmit as
EditStrategy [2] ( and you will never call submit(), or modifications
will be done on the db).
A simply workaround is hiding the row on the view. For example, if you
use a QTableView, you can use [3].
ciao
[1] http://doc.trolltech.com/4.5/qsqltablemodel.html#removeRows
[2] http://doc.trolltech.com/4.5/qsqltablemodel.html#EditStrategy-enum
[3] http://qt.nokia.com/doc/4.5/qtableview.html#hideRow
More information about the Qt-interest-old
mailing list