Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.0
- import Sailfish.Silica 1.0
- import QtQuick.XmlListModel 2.0
- Page {
- id: page
- XmlListModel {
- id:menuXml
- source:"http://www.w3schools.com/xml/simple.xml"
- query:"/breakfast_menu/food"
- XmlRole {name:"name";query:"name/string()"}
- XmlRole {name:"price";query:"price/string()"}
- }
- SilicaListView {
- id:menuView
- width:parent.width
- height:parent.height
- header: PageHeader{
- title:"Breakfast Menu"
- }
- model:menuXml
- delegate:BackgroundItem{
- id:delegate
- Text{
- font.pixelSize: Theme.fontSizeLarge
- color:Theme.primaryColor
- text:name
- }
- Text{
- font.pixelSize: 15
- color:Theme.primaryColor
- text:price
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement