summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-06-06 12:59:06 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-06-06 12:59:06 +0800
commit539682b34968fc87015c4db00d308bf352987b7a (patch)
tree4f6a1495207afbba0cc887caa736fff5bdf2ca7c
parent86e3095d153ef68f2e94bca0082254e0208cefee (diff)
Customisable info, instead of buttons, on Course
-rw-r--r--Shop/Course.ui.qml55
1 files 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"
+ }
}
}
}