From c873d1e6eba863f4247690b335940b8b8bc103af 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: Mon, 8 May 2023 13:22:15 +0800 Subject: Card mouse areas --- Card.ui.qml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Card.ui.qml b/Card.ui.qml index e793111..090b56d 100644 --- a/Card.ui.qml +++ b/Card.ui.qml @@ -7,7 +7,9 @@ import Bootstrap 5.3 Item { property string imageSource: "https://offsetcode.com/themes/messenger/2.2.0/assets/img/avatars/6.jpg" + property alias imageArea: imageArea property string nameText: "Bill Marrow" + property alias nameArea: nameArea property string statusText: qsTr("last seen 3 days ago") implicitHeight: 88.5 @@ -39,8 +41,12 @@ Item { radius: 22 } } - } + MouseArea { + id: imageArea + anchors.fill: parent + } + } ColumnLayout { spacing: 0 anchors { @@ -53,6 +59,11 @@ Item { text: nameText wrapMode: Label.Wrap Bootstrap.heading: 5 + + MouseArea { + id: nameArea + anchors.fill: parent + } } Label { -- cgit v1.2.3