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

Add support of QVariantMap (Javascript Object) for ListView model

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Invalid
    • P3: Somewhat important
    • None
    • 4.8.0
    • None
    • PC Ubuntu

    Description

      The ListView/IconView/GridView supports different kinds of models: javascript array, list<QtObject>, ListModel, QVariantList (converted to javascript array) but not QVariantMap (converted to a javascript Object).

      The best would be that the delegate have access to each key (model.key) and value (model.value) in addition to model.index.

      The reason is that the Object data can be accessed directly by its key from outside the delegate: list[key].
      It would have been perfect if javascript provides Object.values() in addition to Object.keys(), so I can convert the values to a javascript array.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            agroyer Anthony Groyer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes