From e793c1a3753e045f36d1e9bcc511e77f1864db10 Mon Sep 17 00:00:00 2001 From: "Denis V. Dedkov" Date: Sat, 18 May 2024 09:34:42 +0200 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20PullToRefresh=20=D0=B4=D0=BB=D1=8F=20ListView?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/qml/HomeForm.qml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/resources/qml/HomeForm.qml b/resources/qml/HomeForm.qml index 1b5e215..6f0ed3c 100644 --- a/resources/qml/HomeForm.qml +++ b/resources/qml/HomeForm.qml @@ -1,10 +1,14 @@ import QtQuick 2.0 import QtQuick.Controls 2.0 +import ru.ded.components 1.0 + Page { title: qsTr("nooLight") ListView { + id: listView + anchors.fill: parent anchors.margins: 5 @@ -12,7 +16,7 @@ Page { spacing: 5 delegate: LightGroup { - width: parent.width + width: listView.width height: childrenRect.height title: groupName || "" @@ -22,6 +26,16 @@ Page { lightsModel.switchChannel(channelId) } } + + PoolToRefresh { + anchors.top: parent.top + width: parent.width + height: 30 + + onUpdate: { + lightsModel.reload() + } + } } BusyIndicator {