[Interest] Menu in Mac

Rollastre Prostrit rollastre at gmail.com
Thu Sep 24 12:43:42 CEST 2015


Well, I had a strike of inspiration and decided to try something that turned
out to be the reason. The dark trick to make this to work properly was not
related to Qt but to OSX. And apparently, if your application is not inside
a bundle directory (e.g. ./$(AppName.app)/Contents/MacOS/)  then the problem
mentioned below happens. I manually created the directory structure and made
the corresponding links inside the right folder to emulate a bundle and
voilĂ . Now the application menu is shown on startup as it always should have
been.

Just so anybody coming across the same problem knows.

Regards.

-----Original Message-----
From: Rollastre Prostrit [mailto:rollastre at gmail.com] 
Sent: 22. september 2015 17:46
To: interest at qt-project.org
Subject: Menu in Mac

Hi.

I have an application that when run in Linux and Windows shows the main
window with all the menus correctly on startup. However, in Mac, the main
window shows up and grabs the desktop focus as normal, but the menu bar
(mac's menu bar) is not changed and remains the previous one until I focus
(e.g., Cmd+Tab) on other application and go back (e.g., again Cmd+Tab). Then
everything behaves normal.

I have tried a ton of things without success and still I don't manage to
understand what the problem is. I have tried to force all sorts of refresh
events I have been able to imagine without success. Is there any dark trick
to be applied here?

Qt version is currently 5.5. But I have seen it in all the previous ones
I've tried. So, the problem is in my code but... where or what is it?

Thanks!





More information about the Interest mailing list