aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <[email protected]>2024-05-27 15:13:05 +0200
committerRichard Moe Gustavsen <[email protected]>2024-05-28 23:22:50 +0200
commit523b6a5eb0aef0e4b0ca86eca99161c2e9619871 (patch)
tree7f4aa093140d1d2216a5e1a21368523156ef96ec
parent34ec2dec17bb0b4b32b6d9c1b0c23f3afd6b78f4 (diff)
QQuickMenuBar: add docs about using a native menu bar on macOS
Add a note explaining that a native menu bar will be used on macOS from Qt 6.8, and that it can be disabled by using AA_DontUseNativeMenuBar. Change-Id: I4fff1d6e05bbd274a77d0fe145bde5089277f5bc Reviewed-by: Shawn Rutledge <[email protected]>
-rw-r--r--src/quicktemplates/qquickmenubar.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/quicktemplates/qquickmenubar.cpp b/src/quicktemplates/qquickmenubar.cpp
index 43c278e166..5bc6995670 100644
--- a/src/quicktemplates/qquickmenubar.cpp
+++ b/src/quicktemplates/qquickmenubar.cpp
@@ -42,6 +42,15 @@ QT_BEGIN_NAMESPACE
\l {removeMenu}{remove}, and \l {takeMenu}{take} menus dynamically. The
menus in a menu bar can be accessed using \l menuAt().
+ \note Since Qt 6.8, MenuBar is implemented as a native menu bar on \macos. As a
+ result, all Menus, MenuItems and MenuBarItems within a MenuBar will also be native.
+ While this has the advantage that everything will look native, it also comes with the
+ disadvantage that the delegates set on the mentioned controls will not be used
+ for rendering.
+ If a native MenuBar is not wanted, you can set
+ \l {Qt::AA_DontUseNativeMenuBar}{QGuiApplication::setAttribute(Qt::AA_DontUseNativeMenuBar)}
+ to disable it.
+
\sa {Customizing MenuBar}, Menu, MenuBarItem, {Menu Controls},
{Focus Management in Qt Quick Controls}
*/