some list stuff
This commit is contained in:
parent
b24d2bef07
commit
0405a8ba39
2 changed files with 37 additions and 15 deletions
18
main.qml
18
main.qml
|
@ -25,18 +25,15 @@ ApplicationWindow {
|
|||
|
||||
ListView {
|
||||
id: listView
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
spacing: 5
|
||||
anchors.fill: parent
|
||||
spacing: 1
|
||||
model: server.posts
|
||||
delegate: PostListItem {
|
||||
listView: listView
|
||||
}
|
||||
delegate: delegate
|
||||
highlight: Rectangle {
|
||||
color: "lightblue"
|
||||
opacity: 0.5
|
||||
focus: true
|
||||
}
|
||||
focus: true
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,6 +62,13 @@ ApplicationWindow {
|
|||
id: server
|
||||
}
|
||||
|
||||
Component {
|
||||
id: delegate
|
||||
PostListItem {
|
||||
listView: listView
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if(serverLogin.loggedIn()) {
|
||||
loggedIn();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue