summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-03-09 17:21:56 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-03-09 17:21:56 +0800
commitfc6a0ea959ee0c8752d32872be994312478e3445 (patch)
tree4362e6954b8bb66df16d2dc542521644a065a5c0
parenta0260d2dc62b5d9a523b97070a9507ee697e3624 (diff)
Properties for course item
-rw-r--r--Checkout.ui.qml3
-rw-r--r--CourseItem.ui.qml9
2 files changed, 9 insertions, 3 deletions
diff --git a/Checkout.ui.qml b/Checkout.ui.qml
index 4e99c3e..a2c5c12 100644
--- a/Checkout.ui.qml
+++ b/Checkout.ui.qml
@@ -554,6 +554,9 @@ Flickable {
}
delegate: CourseItem {
width: courseItems.width
+ imageSource: image
+ titleText: title
+ priceText: price
}
}
diff --git a/CourseItem.ui.qml b/CourseItem.ui.qml
index 502803e..18bc5d7 100644
--- a/CourseItem.ui.qml
+++ b/CourseItem.ui.qml
@@ -4,6 +4,9 @@ import QtQuick.Layouts 1.15
import QtGraphicalEffects 1.15
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"
readonly property bool doesntEmbed: Qt.platform.os === "android"
|| Qt.platform.os === "linux"
|| Qt.platform.os === "osx"
@@ -49,7 +52,7 @@ ColumnLayout {
left: parent.left
right: parent.right
}
- source: image
+ source: imageSource
fillMode: Image.PreserveAspectFit
layer.enabled: true
layer.effect: OpacityMask {
@@ -67,7 +70,7 @@ ColumnLayout {
Label {
Layout.fillWidth: true
- text: title
+ text: titleText
font {
family: heebo.name
pointSize: 15
@@ -83,7 +86,7 @@ ColumnLayout {
left: parent.left
bottom: parent.bottom
}
- text: price
+ text: priceText
color: "#0cbc87"
font {
family: doesntEmbed ? "Roboto" : regular.name