diff options
Diffstat (limited to 'src/controls/Menu.qml')
-rw-r--r-- | src/controls/Menu.qml | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/controls/Menu.qml b/src/controls/Menu.qml index 9c766846..d7aa4a0a 100644 --- a/src/controls/Menu.qml +++ b/src/controls/Menu.qml @@ -129,9 +129,17 @@ MenuPrivate { /*! \internal */ property Component __selfComponent: null - /*! \internal */ - property Component style: Qt.createComponent(Settings.style + "/MenuStyle.qml", root) + property Component style + Component.onCompleted: { + if (!style) { + __usingDefaultStyle = true + style = Qt.binding(function() { return Qt.createComponent(Settings.style + "/MenuStyle.qml", root) }) + } + } + + /*! \internal */ + property bool __usingDefaultStyle: false /*! \internal */ property var __parentContentItem: __parentMenu.__contentItem /*! \internal */ @@ -142,7 +150,7 @@ MenuPrivate { /*! \internal */ __contentItem: Loader { sourceComponent: MenuContentItem { - menu: root + __menu: root } active: !root.__isNative && root.__popupVisible focus: true |