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

For-Each support for ModelObject

    XMLWordPrintable

Details

    Description

      There is no possibility to iterate through ModelObject properties using JavaScript For-Each statement. Sample code:

      import Qt 4.6
      
      Rectangle {
          ListModel {
              id: model
      
              ListElement {
                  val1: 1
                  val2: 2
              }
          }
      
          Component.onCompleted: {
              var el1 = model.get(0);
      
              console.log(el1);
      
              for (var n in el1)
                  console.log(el1[n]);
          }
      }
      

      Attachments

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

        Activity

          People

            wallison Warwick Allison (closed Nokia identity) (Inactive)
            kolam Paul Kolomiets
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes