QMenuBar on Mac OS X
QMenuBar on Mac OS X is a wrapper for using the system-wide menu bar. If you have multiple menu bars in one dialog the outermost menu bar (normally inside a widget with widget flag Qt::Window) will be used for the system-wide menu bar.
Qt for Mac OS X also provides a menu bar merging feature to make QMenuBar conform more closely to accepted Mac OS X menu bar layout. The merging functionality is based on string matching the title of a QMenu entry. These strings are translated (using QObject::tr()) in the "QMenuBar" context. If an entry is moved its slots will still fire as if it was in the original place. The table below outlines the strings looked for and where the entry is placed if matched:
|about.*||Application Menu | About <application name>||The application name is fetched from the Info.plist file (see note below). If this entry is not found no About item will appear in the Application Menu.|
|config, options, setup, settings or preferences||Application Menu | Preferences||If this entry is not found the Settings item will be disabled|
|quit or exit||Application Menu | Quit <application name>||If this entry is not found a default Quit item will be created to call QApplication::quit()|
You can override this behavior by using the QAction::menuRole() property.
So, Qt parses the name of the menu bar items, and if they even partially match certain string (e.g., "configure"), it will move the item into what it thinks is a Mac native menu bar!!
Since this is probably not what we want here, adding the following to an action disables this feature:
<string>Configure Input device</string>