diff options
author | Andy Shaw <andy.shaw@qt.io> | 2020-05-29 11:39:55 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-06-03 13:18:23 +0000 |
commit | a95aad7f6dd9c87e87dc685dcf62d33b8609ecb4 (patch) | |
tree | 318815aa6143dcf7fc9bdd0d850be14f8169cad7 | |
parent | 4e112857f6e9f4306213fb3f99da06322d1a0bc4 (diff) |
Sync the platform menu after inserting it to the menubar
By syncing the platform menu, we ensure that it passes on the title of
the menu to the native handle if it was dynamically added.
Change-Id: Idd11fa7d9cd3d251e2ed19f99f575f5e2ec5ac1d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit fc5bd87eb202edb3ede1f349da46c4c86ca82ca3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/imports/platform/qquickplatformmenubar.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/imports/platform/qquickplatformmenubar.cpp b/src/imports/platform/qquickplatformmenubar.cpp index 99757829..f7199083 100644 --- a/src/imports/platform/qquickplatformmenubar.cpp +++ b/src/imports/platform/qquickplatformmenubar.cpp @@ -205,6 +205,7 @@ void QQuickPlatformMenuBar::insertMenu(int index, QQuickPlatformMenu *menu) menu->setMenuBar(this); if (m_handle) m_handle->insertMenu(menu->create(), before ? before->handle() : nullptr); + menu->sync(); emit menusChanged(); } |