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

ListView should support javascript arrays

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.5.0
    • None
    • Qt 5.5.0
      Windows 7 x32

    Description

      Suppose I have a ListView which uses external array as a model:

      Item {
          property var data: [ {name: "item1"},{name: "item2"} ]
          ListView {
              model: data.length
              delegate: Text { text: data[index].name }
          }
      }

      In my real project the array may contain subarrays so I cannot use ListModel etc. My purpose is to do that in pure QML
      Now, if I want to change the data:

      data[0].name = "another_name"

      I have no way to update the list.

      Attachments

        Issue Links

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

          Activity

            People

              aalpert Alan Alpert
              folibis ruslan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes