diff options
author | Filippo Cucchetto <filippocucchetto@gmail.com> | 2015-04-06 20:52:15 +0200 |
---|---|---|
committer | Filippo Cucchetto <filippocucchetto@gmail.com> | 2015-04-13 11:49:42 +0000 |
commit | d9d9dd16da54b6b40c37b8e1e9c2394422835ab0 (patch) | |
tree | 2dba312f198535063574a4a4bc1da355cf8ac4f7 /src/controls/qquickmenupopupwindow_p.h | |
parent | 74d33bfb7c51643a38f4968d084689a9d8ef96b7 (diff) | |
download | qtquickcontrols-d9d9dd16da54b6b40c37b8e1e9c2394422835ab0.tar.gz |
Added QQuickMenu reference in QQuickMenuPopupWindow
QQuickMenuPopupWindow has not direct reference to the QQuickMenu that
created it.
This is useful for navigating back from the popup to the QQuickMenu
Change-Id: I6b11641ef90c423df9961277bb3e89573d1ed0e0
Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'src/controls/qquickmenupopupwindow_p.h')
-rw-r--r-- | src/controls/qquickmenupopupwindow_p.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/controls/qquickmenupopupwindow_p.h b/src/controls/qquickmenupopupwindow_p.h index 3f8c29d1..517ba6a0 100644 --- a/src/controls/qquickmenupopupwindow_p.h +++ b/src/controls/qquickmenupopupwindow_p.h @@ -41,11 +41,13 @@ QT_BEGIN_NAMESPACE +class QQuickMenu; + class QQuickMenuPopupWindow : public QQuickPopupWindow { Q_OBJECT public: - QQuickMenuPopupWindow(); + QQuickMenuPopupWindow(QQuickMenu *menu); void setItemAt(QQuickItem *menuItem); void setParentWindow(QWindow *effectiveParentWindow, QQuickWindow *parentWindow); @@ -53,6 +55,8 @@ public: void setParentItem(QQuickItem *); + QQuickMenu *menu() const; + protected Q_SLOTS: void updateSize(); void updatePosition(); @@ -65,6 +69,7 @@ private: QPointF m_oldItemPos; QPointF m_initialPos; QQuickWindow *m_logicalParentWindow; + QQuickMenu *m_menu; }; QT_END_NAMESPACE |