feat(StatusPopupMenu): introduce `closeHandler` hook

This enables us to predefine default close handlers for popup
menus.
This commit is contained in:
Pascal Precht 2021-06-08 13:25:45 +02:00 committed by Pascal Precht
parent 645a3b79a2
commit fb51e9d74a
1 changed files with 7 additions and 0 deletions

View File

@ -16,6 +16,13 @@ Menu {
property int menuItemCount: 0
property var subMenuItemIcons: []
property var closeHandler
onClosed: {
if (typeof closeHandler === "function") {
closeHandler()
}
}
delegate: MenuItem {
id: statusPopupMenuItem