All pastes #2072883 Raw Edit

qt qml maemo

public text v1 · immutable
#2072883 ·published 2011-05-31 17:56 UTC
rendered paste body
import Qt 4.7

Rectangle {
  width: 200
  height: 200

  Component {
    id: delegate
    Image {
      source: thumbnail
    }
  }

  ListView {
    id: view
    anchors.fill: parent
    model: model
    delegate: delegate
  }
  XmlListModel {
    id: model
    namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";"
    source: "http://api.flickr.com/services/feeds/photos_public.gne?format=rss2"
    query: "/rss/channel/item"
    XmlRole { name: "thumbnail"; query: 'media:thumbnail/@url/string()' }
  }

}