Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.3.0
-
04f9219a38 (qt/qtdeclarative/dev) 04f9219a38 (qt/tqtc-qtdeclarative/dev)
Description
Example:
Item { ListModel { id: myModel ListElement { type: "Dog"; age: 8; noise: "meow" } ListElement { type: "Cat"; age: 5; noise: "woof" } } component SomeDelegate: Item { required property int age property string text } component AnotherDelegate: Item { property int _age property string _text SomeDelegate { age: 0 text: "" } } Repeater { model: myModel delegate: AnotherDelegate { _age: model.age _text: model.noise } } }
AnotherDelegate itself has no required properties and therefore should receive "model" as context property. The required property on SomeDelegate prevents this. It shouldn't.
Attachments
Issue Links
- is duplicated by
-
QTBUG-107848 modelData is not defined: Broken view behavior with required property in delegate descendent
- Closed
- split from
-
QTBUG-86009 Index in Repeater is not Working for required Property
- Reported
For Gerrit Dashboard: QTBUG-103479 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
411315,5 | QQmlDelegateModel: Consider only top level required properties | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |