diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2020-04-21 13:55:45 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-05-21 12:42:05 +0200 |
commit | e9d214aea4103fbc24d8297950bedc2da7ea138b (patch) | |
tree | 4b8a4b01e09e12d8cae287248aeea69d2a5ebe89 | |
parent | 2a1d4206c00e70bc9ffb2f4ddc58822efc3ced91 (diff) |
Doc: explain how to allow Menu to move outside of the window via margins
Task-number: QTBUG-82279
Change-Id: Ibc9bae71995f140882dd0f636ff360af8ac0337c
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 26679453b26bed18d873fbbcc758dce112e22189)
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r-- | src/quicktemplates2/qquickmenu.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickmenu.cpp b/src/quicktemplates2/qquickmenu.cpp index c3d80aa0..e4c9b683 100644 --- a/src/quicktemplates2/qquickmenu.cpp +++ b/src/quicktemplates2/qquickmenu.cpp @@ -170,6 +170,14 @@ static const int SUBMENU_DELAY = 225; Although \l {MenuItem}{MenuItems} are most commonly used with Menu, it can contain any type of item. + \section1 Margins + + As it is inherited from Popup, Menu supports \l {Popup::}{margins}. By + default, all of the built-in styles specify \c 0 for Menu's margins to + ensure that the menu is kept within the bounds of the window. To allow a + menu to go outside of the window (to animate it moving into view, for + example), set the margins property to \c -1. + \sa {Customizing Menu}, MenuItem, {Menu Controls}, {Popup Controls} */ |