feat(StatusPopupMenu): introduce `closeHandler` hook
This enables us to predefine default close handlers for popup menus.
This commit is contained in:
parent
a1ecb77f19
commit
6276a789c3
|
@ -16,6 +16,13 @@ Menu {
|
||||||
|
|
||||||
property int menuItemCount: 0
|
property int menuItemCount: 0
|
||||||
property var subMenuItemIcons: []
|
property var subMenuItemIcons: []
|
||||||
|
property var closeHandler
|
||||||
|
|
||||||
|
onClosed: {
|
||||||
|
if (typeof closeHandler === "function") {
|
||||||
|
closeHandler()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
delegate: MenuItem {
|
delegate: MenuItem {
|
||||||
id: statusPopupMenuItem
|
id: statusPopupMenuItem
|
||||||
|
|
Loading…
Reference in New Issue