PDA

View Full Version : How to add a separator before "Preferences" in the Application Menu (Mac OS X)



kyue
29th July 2009, 20:27
Hello,

I'm using Qt. 4.3 on Mac OS X and I am trying to insert a separator before the Preferences menu item in the Application Menu.

I've tried using QMenu::addSeparator(), QMenu::insertSeparator(), and the same functions from QMenuBar, but none of them worked. According to the documentations on QMenuBar on Qt/Mac, adding menu items such as About, Preferences will automatically get placed in the Applications Menu, unless you call the low-level global function:


void qt_mac_set_menubar_merge(bool enable)

and pass in false.


Specifies whether Qt should attempt to relocate standard menu items (such as Quit, Preferences, and About) to the application menu on Mac OS X. This feature is on by default.

In addition, it looks like this was a bug in Qt 4.3 and was fixed in Qt 4.4.

http://www.qtsoftware.com/developer/changes/changes-4.4.0

So, my question is, would anyone else know of another way to place a separator before the Preferences menu?

Any help will be greatly appreciated.

Kat