aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2020-04-21 13:55:45 +0200
committerMitch Curtis <mitch.curtis@qt.io>2020-04-21 14:12:41 +0200
commit26679453b26bed18d873fbbcc758dce112e22189 (patch)
tree2e0e119baeae8eefe3f148f989ae22bb04d6a8ee /src
parentdebbbf8dfce828b36b1c3a7f7ade439bafb3dd10 (diff)
Doc: explain how to allow Menu to move outside of the window via margins
Task-number: QTBUG-82279 Change-Id: Ibc9bae71995f140882dd0f636ff360af8ac0337c Pick-to: 5.15 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quicktemplates2/qquickmenu.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickmenu.cpp b/src/quicktemplates2/qquickmenu.cpp
index dd0f2ab3..d4007870 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}
*/