Problems with first Qt widget project on OSX: No main menu, application menu not localized
-
wrote on 21 Mar 2012, 05:48 last edited by
Hi,
I'm trying to learn Qt by creating a Qt widget GUI application from the template which includes a Qt Designer based main window.
Everything is fine on Windows. However, on the Mac OSX I encountered two problems:(1) The main menu is not shown at all
From the docs I got the impression that Qt just picks up the main menu from the topmost QMainWindow automagically -- but apparently, it doesn't on OSX.
I found something like creating a menubar with no parent, e.g.
QMenuBar *bar = new QMenuBar(0);
and populating the menu myself.
This approach seems to work but is counterproductive because I already designed the main menu in QT Designer.
What am I missing here?(2) The OSX application menu shows English menu texts (e.g. "Quit application") although my locale is German.
I searched the Web up and down for a solution and ended up with loading qt_de.qm at program startup manually.
Is this really the only way?What about Ubuntu 11? It also seems to have an "OSX-like" main menu bar. Will I encounter the same problems?
Regards,
Fred
1/1