Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.0.1
-
None
Description
QQmlListProperty has no accessor for setting an existing element of the exposed array in QML. For example, if "guests" is an exposed QQmlListProperty, the code in Component.onCompleted below has no effect:
BirthdayParty { host: Person { name: "Bob Jones" shoeSize: 12 } guests: [ Person { name: "Cam Stevens" }, Person { name: "Janet White" }, Person { name: "Mahmoud Abdullah" } ] property var leo: Person { name: "Leo Hodges" } property var jack: Person { name: "Jack Smith" } property var anne: Person { name: "Anne Brown" } Component.onCompleted: { guests[0] = leo; guests[1] = jack; guests[2] = anne; } }
This is similar to how writes to an exposed QVariant property are silently discarded, so is at least consistent.
Attachments
Issue Links
- relates to
-
QTBUG-27638 Add ability to append items to QML lists
- Open