Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
Description
The series starting with https://codereview.qt-project.org/c/qt/qtdeclarative/+/479798 adds pushItems and replaceItems functions that are QML compiler-friendly alternatives to push and replace. As they aim to be similar to the original API, they support the [item, properties, item, properties, ...] argument format:
// With properties: stackView.push([ item, { "color": "red" }, rectComponent, { "color": "green" }, Qt.resolvedUrl("MyItem.qml"), { "color": "blue" } ]) // With properties for only some items: stackView.push([ item, { "color": "yellow" }, rectComponent ])
It was suggested in https://codereview.qt-project.org/c/qt/qtdeclarative/+/479798/27/src/quicktemplates/qquickstackview.cpp#1005 that there should be a qmllint check for this.