QMenuBar wraps the OS's native menu system by default. On macOS, the native menu system has a few peculiarities that you need to be aware of:
- macOS uses a global menu, meaning the menu bar is not part of the application window but is attached to the bar at the top of the desktop. By default, your main window's menu bar will be used as the global menu. If you have an application with multiple main windows and you want them all to use the same menu bar, do not use QMainWindow.menuBar() to create the menu bar. Instead, create a QMenuBar object explicitly and assign it to the main window objects you create using the setMenuBar() method.
- macOS also has a number of default submenus and menu items. To access these items, simply use ...