[Interest] Updating a model re-add everything in QML. How can i prevent that?

Jürgen Bocklage-Ryannel juergen.bocklage-ryannel at pelagicore.com
Thu Nov 8 05:09:02 CET 2012


QML Repeater is not smart. Use ListView instead.

/ juergen


On Nov 8, 2012, at 1:33 AM, Mark <markg85 at gmail.com> wrote:

> Hi,
> 
> I have a models in C++ (a QStringList actually). In QML i'm displaying
> it using a repeater. Now when i remove some items from the end of the
> list (which happens quite a few times) then the entire list seems to
> go through the QML repeater again.
> 
> What i want to do is put a QStringList in a QML Repeater (works), but
> when i remove items from the end i would like QML to be "smart" and
> also remove the items from the end and leave those that haven't
> changed. Thus not re-inserting all the items in the repeater when not
> needed.
> 
> Is there some option to get that?
> 
> Cheers,
> Mark
> _______________________________________________
> 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/20121108/1bdd9b5a/attachment.html>


More information about the Interest mailing list