diff --git a/src/lib/plugins/qml/qmlplugininterface.cpp b/src/lib/plugins/qml/qmlplugininterface.cpp index 5c8216d1d..dc8241963 100644 --- a/src/lib/plugins/qml/qmlplugininterface.cpp +++ b/src/lib/plugins/qml/qmlplugininterface.cpp @@ -188,6 +188,11 @@ void QmlPluginInterface::setPopulateWebViewMenu(const QJSValue &value) m_populateWebViewMenu = value; } +QQmlListProperty QmlPluginInterface::childItems() +{ + return QQmlListProperty(this, m_childItems); +} + void QmlPluginInterface::addButton(BrowserWindow *window) { if (m_browserAction->location().testFlag(QmlBrowserAction::NavigationToolBar)) { diff --git a/src/lib/plugins/qml/qmlplugininterface.h b/src/lib/plugins/qml/qmlplugininterface.h index 0f7e9d058..b84854403 100644 --- a/src/lib/plugins/qml/qmlplugininterface.h +++ b/src/lib/plugins/qml/qmlplugininterface.h @@ -36,6 +36,8 @@ class QmlPluginInterface : public QObject, public PluginInterface Q_PROPERTY(QmlBrowserAction* browserAction READ browserAction WRITE setBrowserAction) Q_PROPERTY(QmlSideBar* sideBar READ sideBar WRITE setSideBar) Q_PROPERTY(QJSValue populateWebViewMenu READ readPopulateWebViewMenu WRITE setPopulateWebViewMenu) + Q_PROPERTY(QQmlListProperty childItems READ childItems) + Q_CLASSINFO("DefaultProperty", "childItems") public: explicit QmlPluginInterface(); @@ -59,6 +61,7 @@ private: QmlBrowserAction *m_browserAction; QmlSideBar *m_sideBar; QJSValue m_populateWebViewMenu; + QList m_childItems; QJSValue readInit() const; void setInit(const QJSValue &init); @@ -72,6 +75,7 @@ private: void setSideBar(QmlSideBar *sideBar); QJSValue readPopulateWebViewMenu() const; void setPopulateWebViewMenu(const QJSValue &value); + QQmlListProperty childItems(); void addButton(BrowserWindow *window); void removeButton(BrowserWindow *window);