Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-84107

Using object list (array) as a model unable to track changes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.14.2
    • None

      Docs for Repeater states that list of strings/objects could be used as a model:
      https://doc.qt.io/qt-5/qml-qtquick-repeater.html#delegate-prop

       

      I would like to extend the example with dynamic creation and addition of randomly spawned rectangles. In order to do that I'm adding and removing elements to my object list model.

       

      However the Repeater doesn't track these changes

      It's possible to force re-assignment of the model property and it makes Repeater react to these assignments but it definitely doesn't make what's expected – all the objects handled by Repeater are destroyed and new ones are created, instead of adding or removing just one.

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            romanvalov Roman Valov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes