[Interest] 5.8.0 QAbstractListModel

Лагнер, Сергей developer at lagner.ru
Mon Jan 16 16:24:11 CET 2017


Taking into account the name of your variable I can assume that your
collection is growing.
If it is correct you should take a look to beginInsertRows/endInsertRows
first.

My 2 cents

-- 
Best regards, Sergey Lagner

2017-01-16 6:19 GMT+07:00 mark diener <rpzrpzrpz at gmail.com>:

> Cannot use emit dataChanged(index(0),index(growcount-1)) to cause
> re-display of changed
> values in ListView.
>
> Tried every combination:
>
> emit dataChanged(index(grow),index(grow));
> emit dataChanged(index(0),index(grows));
> emit dataChanged(index(0),index(grows-1));
>
> Only can repaint entire ListView with:
>
>     this->beginResetModel();
>     this->endResetModel();
>
> But this is overkill,. I want to trigger the Model to update a single
> row.
>
> Anyone with ideas?
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170116/6b98f146/attachment.html>


More information about the Interest mailing list