From 539682b34968fc87015c4db00d308bf352987b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Tue, 6 Jun 2023 12:59:06 +0800 Subject: Customisable info, instead of buttons, on Course --- Shop/Course.ui.qml | 55 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/Shop/Course.ui.qml b/Shop/Course.ui.qml index c22d3b6..b324488 100644 --- a/Shop/Course.ui.qml +++ b/Shop/Course.ui.qml @@ -8,7 +8,7 @@ ColumnLayout { property string imageSource: "https://eduport.webestica.com/assets/images/courses/4by3/08.jpg" property string titleText: "Sketch from A to Z: for app designer" property string priceText: "$150" - property alias buttons: buttons + property alias info: info Rectangle { Layout.fillWidth: true @@ -62,33 +62,42 @@ ColumnLayout { Bootstrap.heading: 6 } - Item { + GridView { + id: info Layout.fillWidth: true Layout.topMargin: 16 - implicitHeight: buttons.height + interactive: false + model: 1 + delegate: Item { + width: info.width + height: buttons.height - Label { - id: price - anchors { - top: parent.top - left: parent.left + Label { + id: price + anchors { + top: parent.top + left: parent.left + } + text: priceText + wrapMode: Label.Wrap } - text: priceText - wrapMode: Label.Wrap - } - GridView { - id: buttons - interactive: false - anchors { - top: parent.top - right: parent.right - } - width: 137.016 - model: ["Remove", "Edit"] - delegate: Button { - flat: true - text: modelData + RowLayout { + id: buttons + anchors { + top: parent.top + right: parent.right + } + + Button { + flat: true + text: "Remove" + } + + Button { + flat: true + text: "Edit" + } } } } -- cgit v1.2.3