Skip to content

Instantly share code, notes, and snippets.

@Huholoman
Created October 2, 2015 19:35
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 Huholoman/a014fed9c0dcb7f2e6f9 to your computer and use it in GitHub Desktop.
Save Huholoman/a014fed9c0dcb7f2e6f9 to your computer and use it in GitHub Desktop.
import QtQuick 2.0
import Sailfish.Silica 1.0
Page {
id: page
property alias currentIndex: listView.currentIndex
property alias model: listView.model
SilicaFlickable {
anchors.fill: parent
Drawer {
anchors.fill: parent
background: SilicaFlickable {
anchors.fill: parent
Column {
Label {
text: title
}
Label {
text: desc
}
}
}
MouseArea {
anchors.fill: column
onClicked: {
drawer.open = !drawer.open
}
}
SilicaListView {
id: listView
clip: true
snapMode: ListView.SnapOneItem
orientation: ListView.HorizontalFlick
cacheBuffer: width
anchors.fill: parent
delegate: Column {
anchors.fill: parent
Image {
id: image
source: "file://" + path
width: column.width
height: column.height
fillMode: Image.PreserveAspectFit
sourceSize.height: window.height * 2
asynchronous: true
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment