查到了qt5的变更列表,在设计qsqltablemodel时有下面变化。
- QtSql
- -----
- QSqlQueryModel/QSqlTableModel/QSqlRelationalTableModel
- * The dataChanged() signal is now emitted for changes made to an inserted
- record that has not yet been committed. Previously, dataChanged() was
- suppressed in this case for OnRowChange and OnFieldChange. This was probably
- an attempt to avoid trouble if setData() was called while handling
- primeInsert(). By emitting dataChanged(), we ensure that all views are aware
- of the change.
- * While handling primeInsert() signal, the record must be manipulated using
- the provided reference. Do not attempt to manipulate the records using the