Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

XmlListModel

$
0
0
Seems ok, and I got it to work with adding visible = true for the ApplicationWindow and I also made the TableView cover the whole window with anchors.fill: parent. import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.XmlListModel 2.0   ApplicationWindow {     id: root     title: qsTr("L2 Tool")     width: 500     height: 360     visible: true       TableView {         id: flickerTable         anchors.fill: parent         TableViewColumn {             title: "Column 1"             role: "title"         }         model: flickerModel     }       XmlListModel{         id: flickerModel         source: "http://api.flickr.com/services/feeds/photos_public.gne?format=rss2&tags=Cat"         query: "/rss/channel/item"         namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";"         XmlRole { name: "title"; query: "title/string()" }         XmlRole { name: "date"; query: "pubDate/string()" }         XmlRole { name: "source"; query: "media:thumbnail/@url/string()" }         XmlRole { name: "credit"; query: "media:credit/string()" }     } }

Viewing all articles
Browse latest Browse all 4972

Trending Articles