Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.0
-
None
Description
Although this is parsed by QML:
MyDelegate.qml
import Qt 4.6 Component { property alias text: t.text Text { id: t; text: "hello" } }
it cannot be used:
import Qt 4.6 GridView { MyDelegate { id: d text: "goodbye" } delegate: d model: 3 }
it gives error:
bug.qml:6:9: Cannot assign to non-existent property "text" text: "goodbye"
The desired result can be achieved:
MyDelegate.qml
import Qt 4.6 Item { property alias text: t.text Text { id: t; text: "hello" } }
import Qt 4.6 GridView { Component { id: d MyDelegate { text: "goodbye" } } delegate: d model: 3 }
Should either work, or Component should not be allowed as top level of QML file, or Components should not be allowed to have new/aliased properties.