[Interest] QML "container" inheritience and sharing IDs

Jason H scorp1us at yahoo.com
Fri Jan 3 16:23:03 CET 2014


I have a structured QML document that is nothing more than Items and Images. Some Images are collected into an Item and an id is assigned.




Structure1.qml
Item {
id:item
Image { id: image1}
Image { id: image2}

}

I then inherit this structure, and set the additional info at runtime:
CompleteObject1.qml
Structure {
Component.onCompleted: {
image1.source = "image1.png"
image2.source = "image2.png"
}

}

But when I load CompleteObject.qml it says "image1 not defined"
How can I expose the Structure ids to the CompleteObject?

(The structure and objects are functionally independent, except that they have matching IDs, such that StructureN intersects CompleteObjectN makes an instance )

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140103/54e0ea3b/attachment.html>


More information about the Interest mailing list