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.