[Interest] 5.8.0 QAbstractListModel

william.crocker at analog.com william.crocker at analog.com
Mon Jan 16 12:18:09 CET 2017


On 01/15/2017 06:19 PM, mark diener wrote:
> 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));
>

I do this all of the time and it works fine.

     QModelIndex index = createIndex(row,col);
     emit dataChanged(index,index);

> 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
>
>
>



More information about the Interest mailing list