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

Using a JavaScript Array of JS Objects as an itemview model doesn't work as expected

    XMLWordPrintable

Details

    Description

      When using a JavaScript array of objects, the magical "model" property does not get populated as one would expect. modelData is a valid workaround, but it would be nice to not need it. See attached example.

      A console.log(model) reveals that model is of type QQmlDMListAccessorData, leading me to think that the problem is somewhere inside QtQml's adaptation of this type.. but I haven't looked at the code in question at all really.

      Attachments

        1. test.qml
          0.6 kB
          Robin Burchell

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              w00t Robin Burchell
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes