1
import QtQuick 1.0
Rectangle {
Component {
id: delegate
Text{text: title}
}
ListView {
y:10
id: view
anchors.fill: parent
model: model
delegate: delegate
}
XmlListModel {
id:model
source: "http://www.w3.org/"
query: "/html/head"
namespaceDeclarations: "declare default element namespace 'www.w3.org/1999/xhtml/';"
XmlRole { name: "title"; query: "title/string()" }
}
}
我希望我的模型,現在將有一個元素與標題=「萬維網聯盟(W3C)」顯示 但沒有。 model.count是零,但model.progress是1 我使用錯誤的名稱空間聲明?問題加載網頁到QML XmlListModel
千恩萬謝
帕特里克