Skip to content

Instantly share code, notes, and snippets.

@bluszcz
Created March 7, 2015 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bluszcz/5c35f14910ba462ecbc8 to your computer and use it in GitHub Desktop.
Save bluszcz/5c35f14910ba462ecbc8 to your computer and use it in GitHub Desktop.
import QtQuick 2.0
import Sailfish.Silica 1.0
Page {
id: page
SilicaFlickable {
anchors.fill: parent
PullDownMenu {
MenuItem {
text: qsTr("Credits")
onClicked: pageStack.push(Qt.resolvedUrl("Credits.qml"))
}
}
contentHeight: column.height
Column {
id: column
width: page.width
spacing: Theme.paddingLarge
PageHeader {
title: qsTr("Veggie Sailor")
}
Repeater {
id: repeater
width: page.width
model: ListModel {
ListElement {
mytext: "Barcelona"
image: "qrc:///static/images/barcelona.jpg"
}
ListElement {
mytext: "Copenhagen"
image: "qrc:///static/images/copenhagen.jpg"
}
}
delegate: customblock
}
Component {
id: customblock
Rectangle {
height: 350
width: page.width
Label {
text: qsTr(mytext)
color: Theme.secondaryHighlightColor
x: Theme.paddingLarge
}
Image {
width: column.width
height: 200
fillMode: Image.PreserveAspectCrop
source: image
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment