diff --git a/ui/StatusQ/sandbox/pages/StatusToastMessagePage.qml b/ui/StatusQ/sandbox/pages/StatusToastMessagePage.qml index 8dd0920ce0..f24aeb9f80 100644 --- a/ui/StatusQ/sandbox/pages/StatusToastMessagePage.qml +++ b/ui/StatusQ/sandbox/pages/StatusToastMessagePage.qml @@ -35,6 +35,9 @@ Item { onClose: { console.warn("toast closed: ", modelData.title) } + onClicked: { + console.warn("toast clicked") + } } } } diff --git a/ui/StatusQ/src/StatusQ/Components/StatusToastMessage.qml b/ui/StatusQ/src/StatusQ/Components/StatusToastMessage.qml index e0b484819a..e43c7acee1 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusToastMessage.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusToastMessage.qml @@ -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