[Interest] Inconsistencies in MenuBar behaviour on Windows (QtQuick.Controls vs Qt.labs.platform)

Nuno Santos nuno.santos at imaginando.pt
Thu Dec 11 11:05:40 CET 2025


Richard,

Thanks for your reply.

As a user, when I was expecting the MenuBar to look and feel native and consistent in all platforms when it was moved to the Controls.

The MenuBar in Windows does not look like a native menu bar and that does not feel right to the user. My opinion is that it should behave exactly as a native menu bar.

The labs version of the MenuBar can be attached to the window without being placed on a ApplicationWindow. I will not open a bug report because this is actually convenient in my use case. My applications can be opened iOS, Android, macOS, Windows, and in desktop they can even be opened inside a host plugin window. Because of this my root elements on desktop are not windows. It’s a simple rectangle. I load the root element to a quick view which is then displayed. Therefore I don’t have access to the ApplicationWindow. So for me it is convenient that the MenuBar gets attached correctly even when declared on a non root window element,

I’ve created a split case depending on the operating system in order to use the labs version in windows.

Thank you!

Best regards,

Nuno

> On 5 Dec 2025, at 13:03, Richard Gustavsen <Richard.Gustavsen at qt.io> wrote:
> 
> 
> 
>> On 4 Dec 2025, at 16:12, Nuno Santos via Interest <Interest at qt-project.org> wrote:
>> 
>> Hi,
>> 
>> I’m trying to uniformize the use of MenuBar since nowadays it is present in QtQuickControls and is not an experimental feature anymore.
>> 
>> However, on Windows it behaves very differently. When using the labs.platform version, the MenuBar really looks like a menu bar, the very same height and look and feel encountered on QtCreator itself. 
>> 
>> However, if I use the QtQuickControls version, it gets higher in height, and the menu items have rounded corners. 
> 
> Hi!
> 
> As documented here https://doc.qt.io/qt-6/qml-qtquick-controls-menubar.html#native-menu-bars , a true native menu bar is only applied on macOS if using the MenuBar in Qt Quick Controls (as opposed to the version in labs, as you point out). The reason is that the labs implementation is old (based on win32 APIs), and doesn’t look very native anymore compared to e.g Outlook, Notepad, Paint etc. Newer Windows apps use slightly taller menu bars with more rounded buttons, which is why the MenuBar in Qt Quick Controls is styled to match this more contemporary look.
> 
>> And the worst of all, it does not get into scene properly if the root element is not a window. In my case I have a root basic root element that is loaded by a QQuickView. 
> 
> You cannot expect a MenuBar to be placed correctly inside the window unless assigned to ApplicationWindow.menuBar. Is this a regression, did it used to work before (not thinking about the labs MenuBar)? If so, please file a bug report so we can take a look at it.
> 
>> Is this a known limitation of the MenuBar that was integrated into QtQuick.Controls?
> 
> The limitation is that we currently don’t offer a true native menu bar on other platforms than macOS, unless you use the version in labs.
> 
>> It feels that I will need to keep use of the labs.platform version on windows and the other one for macOS and iOS? I really don’t like to have this kind of exceptions because this is the primary goal of Qt.
> 
> The labs version will remain available for the foreseeable future, so if it works well for your use case, you can safely continue using it.
> 
> BR,
> Richard Moe Gustavsen
> Principal Engineer
> The Qt Company
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20251211/62258394/attachment.htm>


More information about the Interest mailing list