I am trying to create a menu with PySide. This is the code
def _createMenus(self):
self._menuBar = QtGui.QMenuBar()
self.setMenuBar(self._menuBar)
self._helpMenu = self._menuBar.addMenu("Help")
self._aboutAction = QtGui.QAction("About", self, statusTip="About", triggered=self._about)
self._helpMenu.addAction(self._aboutAction)
This code does not show anything in the menu bar, except the “python” entry.
Weird enough, if I change “About” in “Aout” it displays the menu. Is there some platform dependent weirdness I should be aware of ?
The menu items on Mac OS X can be moved automatically by Qt to the system-wide menubar depending on the action’s text and/or
menuRoleproperty (see QMenuBar on Mac OS X for details).So your “About” menu item should be the first item in the application menu.