How do I place XML data in a Selection Dialog

  • "Example Selection Dialog":

    I have a Selection Dialog like the one in the picture I attached.
    The data in the selection dialog were preset like this.

    titleText:"Select a Box"
    ListElement { name: "Inbox"; boxId: 0}
    ListElement { name: "Today"; boxId: 1}
    ListElement { name: "Next"; boxId: 2}
    ListElement { name: "Later"; boxId: 3}

    delegate: itemDelegate
    Component {
    id: itemDelegate
    MenuItem {
    onClicked: {
    selectedIndex = index;

    } //close

    Right now, I want to retrieve an XML data and display it in the selection dialog instead of setting it manually by myself.
    My XML data is this

    XmlListModel {
    id: photo1
    property string feedUrl: ""
    property bool loading: status == XmlListModel.Loading

                source: "(_example url_)"
                query: "/plist/array/dict"
                XmlRole { name: "photoTitle"; query: "string[1]/string()";}

    To be clearer, instead of keying in Inbox, Today etc. by myself into the Selection Dialog,
    I want to retrieve the XML data that display item e.g(October, November, December) into the Selection Dialog.
    Any idea how to do it? Really need help.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.