fix(StatusToastMessage): `clicked` signal added

This commit is contained in:
Sale Djenic 2022-06-21 11:24:55 +02:00 committed by saledjenic
parent 7d064d6c6e
commit 604bb7a74c
2 changed files with 11 additions and 0 deletions

View File

@ -35,6 +35,9 @@ Item {
onClose: { onClose: {
console.warn("toast closed: ", modelData.title) console.warn("toast closed: ", modelData.title)
} }
onClicked: {
console.warn("toast clicked")
}
} }
} }
} }

View File

@ -125,6 +125,11 @@ Control {
root.open = true; root.open = true;
} }
/*!
\qmlsignal
This signal is emitted when the ToastMessage is clicked.
*/
signal clicked()
/*! /*!
\qmlsignal \qmlsignal
This signal is emitted when the ToastMessage is closed (after animation). This signal is emitted when the ToastMessage is closed (after animation).
@ -214,6 +219,9 @@ Control {
onMouseXChanged: { onMouseXChanged: {
root.open = (mouseX < (root.width/3)); root.open = (mouseX < (root.width/3));
} }
onClicked: {
root.clicked();
}
} }
RowLayout { RowLayout {
anchors.fill: parent anchors.fill: parent