2019-12-21 01:29:45 +11:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
|
|
|
|
import QtQuick 2.12
|
|
|
|
import QtQuick.Controls 2.12
|
|
|
|
|
|
|
|
HMenuItem {
|
2020-07-12 14:25:57 +10:00
|
|
|
property var popup // url or HPopup Component
|
|
|
|
property bool autoDestruct: true
|
|
|
|
property var properties: ({})
|
|
|
|
|
|
|
|
|
2019-12-21 01:29:45 +11:00
|
|
|
onTriggered: {
|
|
|
|
menu.focusOnClosed = null
|
|
|
|
|
|
|
|
utils.makePopup(
|
|
|
|
popup,
|
|
|
|
utils.objectUpdate(
|
|
|
|
{ focusOnClosed: menu.previouslyFocused }, properties,
|
|
|
|
),
|
|
|
|
null,
|
|
|
|
autoDestruct,
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|