[Development] Custom QPlatformTheme plugin for exposing global menus

Eduardo Hopperdietzel ehopperdietzel at gmail.com
Fri Nov 17 00:55:22 CET 2023


Hello,

I am currently working on a library for exposing global menus in Wayland,
and as part of this effort, I am developing a custom QPlatformTheme plugin.
However, I have encountered some uncertainties.

While I have successfully exported menu bars, menus, and items to my
"global menu," I am facing an issue where the changes are not atomic.
Consequently, the menus are created and organized in real time, which is
especially noticeable when dealing with a large number of menus. I've
observed virtual methods such as QPlatformMenuBar::syncMenu() and
QPlatformMenu::syncMenuItem(), which seem designed to allow external
platform menus to apply changes atomically. Unfortunately, these methods do
not seem to be invoked. Is there a way to enable them? Additionally, is
there any documentation related to this? I've checked [1], but there is no
information specific to menus.

Thanks,
Eduardo Hopperdietzel

[1] https://doc.qt.io/qt-6/plugins-howto.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20231116/491acd39/attachment.htm>


More information about the Development mailing list