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

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

    XMLWordPrintable

Details

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

    Description

      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.

       

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes