[Qt-interest] QSqlTableModel and dataChanged signal
Petric Frank
pfrank at gmx.de
Mon Sep 27 02:30:36 CEST 2010
Hello,
using a QSqlTableModel instance i bind the dataChanged signal to an own slot
to be informed when data is changed somewhere in my views using the model.
Sample code:
QSqlTableModel *model = new QSqlTableModel;
model->setTable ("table");
model->select ();
QTableView *view = new QTableView ....
view->setModel (model);
connect (model, SIGNAL (dataChanged (...), this, SLOT (changed ()));
This works as long as the edit strategy is *not* OnManualSubmit. Then this
signal is not emitted - for example - at the insertRecord call.
Also committing the data to the database using the submitAll call does not
emit this signal.
What i have to use to get informed about changes independent of the edit
strategy ?
regards
More information about the Qt-interest-old
mailing list