From 4253f11774ed113cfc69794435e7e66b373bc2cd Mon Sep 17 00:00:00 2001 From: Tobias Koenig Date: Thu, 3 Sep 2015 15:55:54 +0200 Subject: Implement QQmlListModel::setData() Extending QQmlListModel by setData allows us to modify the content of the ListModel from within a delegate by doing an 'model.someProp = someValue' assignment. Change-Id: I87e4c31aca3813f099b2a4fd694beb2492a03bd0 Reviewed-by: Alan Alpert --- src/qml/types/qqmllistmodel_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/qml/types/qqmllistmodel_p.h') diff --git a/src/qml/types/qqmllistmodel_p.h b/src/qml/types/qqmllistmodel_p.h index b5a5ef3265..21de392234 100644 --- a/src/qml/types/qqmllistmodel_p.h +++ b/src/qml/types/qqmllistmodel_p.h @@ -71,6 +71,7 @@ public: QModelIndex index(int row, int column, const QModelIndex &parent) const; int rowCount(const QModelIndex &parent) const; QVariant data(const QModelIndex &index, int role) const; + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); QHash roleNames() const; QVariant data(int index, int role) const; -- cgit v1.2.3