[Qt-qml] List Elements with references to Items

alan.westbrook at nokia.com alan.westbrook at nokia.com
Mon Jul 26 10:08:22 CEST 2010


Hi,

I have need to reference an item (for dynamic creation of an object) and a model (for that items contents) from a ListElement.

When I try and add a property that isn't a basic QML type, it tells me 'no way Jose'.

Is there a recommended way of doing something like this?


    Component {

        id: locationPref

        RadioGroup {

        }

    }


    ListModel {

        id: locations

        ListElement { name: "home" }

        ListElement { name: "mars" }

        ListElement { name: "europe" }

        ListElement { name: "next door" }

    }


    ListModel {

        id: filteritems

        ListElement { name: "location"; selected: false; model: locations; delegate: locationPref }

    }

Again, apologies for the colors.

Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100726/6ff40267/attachment.html 


More information about the Qt-qml mailing list