Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.7.0
-
None
-
f6bfc5bcbed84a71b22fb04b56ae6eb294e4914d
Description
Example is in attachment
1) program a QAbstractListModel with a slot or Q_INVOKABLE that changes it's data and emits a dataChanged similar to this:
void Model::changeData()
{
m_elements[1] ="x";
emit dataChanged(index(1,0), index(1,0));
}
2) extend the QAbstracListModel as a useable model in QML as is done in the example
3) hook up the model to the listview and the slot to a key press.
===>The slot gets called, the method QAbstracListModel::data() gets called, but the listview does not get updated
Notes: a model reset() will update the listview.