diff --git a/CardModel.qml b/CardModel.qml index 942133c..3159815 100644 --- a/CardModel.qml +++ b/CardModel.qml @@ -9,6 +9,7 @@ Item { required property PlayingCard card; required property bool isFaceDown; property string backStyle: "red" + signal clicked(); Image { id: cardImage @@ -19,5 +20,10 @@ Item { ? "qrc:/img/playing_cards/fronts/" + cardModel.card.suitString + "_" + cardModel.card.valueString + ".svg" : "qrc:/img/playing_cards/backs/blue.svg" fillMode: Image.PreserveAspectFit + + MouseArea { + anchors.fill: parent + onClicked: cardModel.clicked() + } } }