-
-
Save celeron55/e68cae944dd7c8bcdd71 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.0 | |
import Sailfish.Silica 1.0 | |
import MetacraneClient 1.0 | |
Page { | |
id: page | |
property string crane_name: "Unknown" | |
SilicaListView { | |
id: listView | |
anchors.fill: parent | |
header: PageHeader { | |
title: "\""+crane_name+"\" | Metacrane" | |
} | |
//model: MetacraneClient.entities | |
model: ListModel { | |
ListElement {testname: "Foo"} | |
} | |
delegate: BackgroundItem { | |
id: delegate | |
Label { | |
x: Theme.paddingLarge | |
//text: "Item "+index | |
//text: components.description.text | |
text: testname | |
anchors.verticalCenter: parent.verticalCenter | |
color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor | |
} | |
MouseArea { | |
anchors.fill: parent | |
onClicked: { | |
console.log("Clicked " + index) | |
console.log("delegate", delegate) | |
console.log("model", model) | |
console.log("model.testname", model.testname) | |
} | |
} | |
} | |
VerticalScrollDecorator {} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment