Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
6.8.0.2
-
None
-
PySide6 version: 6.8.0.2
Python version: 3.x
OS: macOS
Description
When creating a Window menu in a PySide6 application on macOS, the native menu items (Minimize, Zoom, Bring All to Front, etc.) are not automatically added as they should be according to macOS Human Interface Guidelines. However, it does add native menu items for Edit and Help menus.
According to Apple's Human Interface Guidelines (https://developer.apple.com/design/human-interface-guidelines/the-menu-bar#Window-menu), these menu items should be provided automatically when creating a Window menu on macOS.
Steps to reproduce:
- Create a minimal PySide6 application on macOS with a Window menu
- Run the application
- Observe the Window menu contents
Expected behavior:
Window menu should automatically include standard macOS items:
- Minimize (⌘M)
- Zoom
- Bring All to Front
- Enter Full Screen (^⌘F)
- Window list (when multiple windows are open)
Actual behavior:
- Window menu only shows manually added items
- No native macOS menu items are automatically added
- Menu disappears completely if no manual items are added
Environment:
- PySide6 version: 6.8.0.2
- Python version: 3.x
- OS: macOS
Minimal reproducible example:
from PySide6.QtGui import QAction from PySide6.QtWidgets import QApplication, QMainWindow, QMenu import sys class TestWindow(QMainWindow): def __init__(self): super().__init__() self.setWindowTitle("Test Window Menu") menubar = self.menuBar() menubar.setNativeMenuBar(True) edit_menu = QMenu("Edit", menubar) minimize_action = QAction("Dummy Action", edit_menu) edit_menu.addAction(minimize_action) window_menu = QMenu("Window", menubar) minimize_action = QAction("Dummy Action", window_menu) window_menu.addAction(minimize_action) help_menu = QMenu("Help", menubar) minimize_action = QAction("Dummy Action", window_menu) help_menu.addAction(minimize_action) menubar.addMenu(edit_menu) menubar.addMenu(window_menu) menubar.addMenu(help_menu) app = QApplication(sys.argv) window = TestWindow() window.show() sys.exit(app.exec())
Attachments
Issue Links
- relates to
-
QTBUG-131669 Native macOS Window menu items not automatically added to `Window` menu on menu bar
-
- Reported
-