fix(StatusToastMessage): `clicked` signal added

This commit is contained in:
Sale Djenic 2022-06-21 11:24:55 +02:00 committed by Michał Cieślak
parent e0ddb0f8d0
commit e8bb092db4
2 changed files with 11 additions and 0 deletions

View File

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

View File

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