From 106e7b631a8b969c851a5124d3f524ecf0b50ebf Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Thu, 15 Feb 2018 10:42:54 +0100 Subject: Document how to position a popup in the center of the window This was already in Overlay's docs, but not Popup's, so this patch moves the example to a .qdocinc and includes it in both places, creating a new Popup Positioning section in the process. Change-Id: I8e8438919fd849a8466b3a28133d22bb45f7dc19 Reviewed-by: J-P Nurmi --- src/quicktemplates2/qquickpopup.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/quicktemplates2/qquickpopup.cpp') diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp index 207a886b..03328b43 100644 --- a/src/quicktemplates2/qquickpopup.cpp +++ b/src/quicktemplates2/qquickpopup.cpp @@ -168,6 +168,15 @@ QT_BEGIN_NAMESPACE } \endcode + \section1 Popup Positioning + + Similar to items in Qt Quick, Popup's \l x and \l y coordinates are + relative to its parent. This means that opening a popup that is a + child of a \l Button, for example, will cause the popup to be positioned + relative to the button. + + \include qquickoverlay-popup-parent.qdocinc + \sa {Popup Controls}, {Customizing Popup}, ApplicationWindow */ -- cgit v1.2.3