Emit which role actually changed
Change-Id: I596a81628e5553779986a94769e114d89a44b264 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
parent
c816a338f7
commit
20dbad1bbf
@ -189,7 +189,7 @@ bool QStringListModel::setData(const QModelIndex &index, const QVariant &value,
|
||||
if (index.row() >= 0 && index.row() < lst.size()
|
||||
&& (role == Qt::EditRole || role == Qt::DisplayRole)) {
|
||||
lst.replace(index.row(), value.toString());
|
||||
emit dataChanged(index, index);
|
||||
emit dataChanged(index, index, QVector<int>() << role);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user