diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2018-05-02 15:16:47 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-05-02 14:43:07 +0000 |
commit | f9779928136a25db8fb84db9450ae6fc4aa5bb14 (patch) | |
tree | ab3edb8923b89d9e79895255728188d92273872a /src/quicktemplates2/qquickpopup_p_p.h | |
parent | 5dc2465dc5d2970ef97f66bd21ccebb8792419f1 (diff) |
QQuickPopup: prepare for overriding the positioner
Create the positioner lazily to make it possible for QQuickPopup
sub-classes to override the positioner, and give the upcoming
QQuickPopupPositioner sub-classes access to the popup instance.
- QQuickDrawer has custom positioning along the window edges
- QQuickMenu has custom positioning for cascading sub-menus
- in the future, native menus, native tooltips, and top-level
popups/dialogs will also need different positioners.
Change-Id: I7c3ac2c38b00ef92410b2cdf4e51fa974efb534f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickpopup_p_p.h')
-rw-r--r-- | src/quicktemplates2/qquickpopup_p_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickpopup_p_p.h b/src/quicktemplates2/qquickpopup_p_p.h index 37c9ffe5..b6e0efca 100644 --- a/src/quicktemplates2/qquickpopup_p_p.h +++ b/src/quicktemplates2/qquickpopup_p_p.h @@ -140,6 +140,7 @@ public: void setBottomMargin(qreal value, bool reset = false); QQuickPopupAnchors *getAnchors(); + virtual QQuickPopupPositioner *getPositioner(); void setWindow(QQuickWindow *window); void itemDestroyed(QQuickItem *item) override; |