Добавил загрузку модели, добавил рыбу делегата
This commit is contained in:
25
HomeForm.qml
25
HomeForm.qml
@@ -2,10 +2,27 @@ import QtQuick 2.0
|
||||
import QtQuick.Controls 2.0
|
||||
|
||||
Page {
|
||||
title: qsTr("Home")
|
||||
title: qsTr("nooLight")
|
||||
|
||||
Label {
|
||||
text: qsTr("You are on the home page. " + settings.serviceUrl)
|
||||
anchors.centerIn: parent
|
||||
LightsModel {
|
||||
id: lightsModel
|
||||
|
||||
serviceUrl: settings.serviceUrl
|
||||
|
||||
onError: console.log(text)
|
||||
}
|
||||
|
||||
ListView {
|
||||
anchors.fill: parent
|
||||
|
||||
model: lightsModel
|
||||
spacing: 5
|
||||
|
||||
delegate: LightGroup {
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
|
||||
title: groupName || ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user