Advertisement
Guest User

Untitled

a guest
Dec 26th, 2013
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import QtQuick 2.0
  2. import Sailfish.Silica 1.0
  3.  
  4. Page {
  5.     id: page
  6.    
  7.     // To enable PullDownMenu, place our content in a SilicaFlickable
  8.     SilicaFlickable {
  9.         anchors.fill: parent
  10.        
  11.         // PullDownMenu and PushUpMenu must be declared in SilicaFlickable, SilicaListView or SilicaGridView
  12.         PullDownMenu {
  13.             MenuItem {
  14.                 text: "About"
  15.                 onClicked: pageStack.push(Qt.resolvedUrl("SecondPage.qml"))            
  16.             }
  17.         }
  18.        
  19.         // Tell SilicaFlickable the height of its content.
  20.         contentHeight: childrenRect.height
  21.        
  22.         SilicaListView {
  23.             id: listView
  24.             model: 20
  25.             anchors.fill: parent
  26.             header: PageHeader {
  27.                 title: "Soma.fm channels"
  28.             }
  29.  
  30.             delegate: BackgroundItem {
  31.                 Label {
  32.                     x: Theme.paddingLarge
  33.                     text: "Item " + index
  34.                 }
  35.                 onClicked: console.log("Clicked " + index)
  36.             }
  37.         }
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement