listview can't display XmlListModel when XML's content used chinese codec



  • I used XmlListModel as listview's model ,but when the xml content is chinese codec, listview can't display it,
    anyone can help me ? thanks alot !!

    XmlListModel {
    id: Model
    source: "URL"
    query: "/response/result/doc"

        XmlRole { name: "title"; query: "title/string()" }
     
    }
    

    ListView {
    id: list
    width: window.width - 220; height: window.height
    model: Model
    delegate: NewsDelegate {}
    }


Log in to reply
 

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