akiross
12th November 2008, 17:15
Hello!
In my application (qt 4.4.2) I've a QSqlTableModel, which is used as source model for a custom proxy model, which does a little more than filtering (so I can't use filter proxy model).
The table model is source model for a table view while the proxy model is source for a list view.
But, if I add new record to the sqltablemodel, the list view isn't updated and I don't see anything added.
I tried overwriting setSourceModel in my proxy, connecting source's dataChanged(...) signal to a new signal which print a message with qDebug, but this message is never printed, so it seems that dataChanged is never called from a QSqlTableModel.
Is this normal? How can I overcome this updating issue?
Thanks
In my application (qt 4.4.2) I've a QSqlTableModel, which is used as source model for a custom proxy model, which does a little more than filtering (so I can't use filter proxy model).
The table model is source model for a table view while the proxy model is source for a list view.
But, if I add new record to the sqltablemodel, the list view isn't updated and I don't see anything added.
I tried overwriting setSourceModel in my proxy, connecting source's dataChanged(...) signal to a new signal which print a message with qDebug, but this message is never printed, so it seems that dataChanged is never called from a QSqlTableModel.
Is this normal? How can I overcome this updating issue?
Thanks