aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickmenubar_p_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicktemplates2/qquickmenubar_p_p.h')
-rw-r--r--src/quicktemplates2/qquickmenubar_p_p.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/quicktemplates2/qquickmenubar_p_p.h b/src/quicktemplates2/qquickmenubar_p_p.h
index 24824292..4d5e61e6 100644
--- a/src/quicktemplates2/qquickmenubar_p_p.h
+++ b/src/quicktemplates2/qquickmenubar_p_p.h
@@ -66,6 +66,9 @@ public:
return menuBar->d_func();
}
+ QQmlListProperty<QQuickMenu> menus();
+ QQmlListProperty<QObject> contentData();
+
void createItems();
QQuickItem *beginCreateItem();
@@ -82,8 +85,11 @@ public:
void onItemTriggered();
void onMenuAboutToHide();
- void updateContentSize();
- void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override;
+ qreal getContentWidth() const override;
+ qreal getContentHeight() const override;
+
+ void itemImplicitWidthChanged(QQuickItem *item) override;
+ void itemImplicitHeightChanged(QQuickItem *item) override;
static void contentData_append(QQmlListProperty<QObject> *prop, QObject *obj);
@@ -94,10 +100,6 @@ public:
bool popupMode = false;
bool triggering = false;
- bool hasContentWidth = false;
- bool hasContentHeight = false;
- qreal contentWidth = 0;
- qreal contentHeight = 0;
QQmlComponent *delegate = nullptr;
QPointer<QQuickMenuBarItem> currentItem;
};