Details
-
Suggestion
-
Resolution: Done
-
P4: Low
-
None
-
None
Description
QAbstractItemModel emits the dataChanged() signal whenever data in an existing index changes. However, the signal may provide information about multiple indexes, and does not provide information about which role the data in the index changed for or what the new data is (or what the previous data was).
Thus, it would be nice if models emitted a signal whenever the data in an existing index changes, that contains information about the index, the role, the new data, and possibly the previous data. Something like the following:
void indexDataChanged(const QModelIndex &index, int role, const QVariant &new, const QVariant &old);
It would be nice if corresponding item based signals were emitted by the convenience views (QListWidget, QTableWidget and QTreeWidget). Something like:
void itemDataChanged(QListWidgetItem *item, int role, const QVariant &new, const QVariant &old);
void itemDataChanged(QTableWidgetItem *item, int role, const QVariant &new, const QVariant &old);
void itemDataChanged(QTreeWidgetItem *item, int column, int role, const QVariant &new, const QVariant &old);