From f1001578d5060683776f82c6a82bcdc883e2582c Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Thu, 11 Jul 2024 22:54:53 +0200 Subject: [PATCH] native: table srewable --- native/MainPage.qml | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/native/MainPage.qml b/native/MainPage.qml index 23687a3..1a159bd 100644 --- a/native/MainPage.qml +++ b/native/MainPage.qml @@ -104,30 +104,35 @@ Rectangle { } } - ListView { - id: listView + ScrollView { Layout.fillWidth: true Layout.fillHeight: true - clip: true - boundsBehavior: Flickable.StopAtBounds - model: filteredApiDataModel // Use the filtered model - delegate: Rectangle { - width: listView.width - height: 50 - color: getColors().button + ListView { + id: listView + Layout.fillWidth: true + Layout.fillHeight: true + clip: true + boundsBehavior: Flickable.StopAtBounds + model: filteredApiDataModel // Use the filtered model - RowLayout { - anchors.fill: parent - spacing: 10 - anchors.margins: 5 + delegate: Rectangle { + width: listView.width + height: 50 + color: getColors().button - Text { text: model.name; color: getColors().text; Layout.fillWidth: true } - Text { text: model.key; color: getColors().text; Layout.fillWidth: true } - Text { text: model.amount; color: getColors().text; Layout.fillWidth: true } - Text { text: model.start; color: getColors().text; Layout.fillWidth: true } - Text { text: model.end; color: getColors().text; Layout.fillWidth: true } - Text { text: model.group; color: getColors().text; Layout.fillWidth: true } + RowLayout { + anchors.fill: parent + spacing: 10 + anchors.margins: 5 + + Text { text: model.name; color: getColors().text; Layout.fillWidth: true } + Text { text: model.key; color: getColors().text; Layout.fillWidth: true } + Text { text: model.amount; color: getColors().text; Layout.fillWidth: true } + Text { text: model.start; color: getColors().text; Layout.fillWidth: true } + Text { text: model.end; color: getColors().text; Layout.fillWidth: true } + Text { text: model.group; color: getColors().text; Layout.fillWidth: true } + } } } }