문제

I am running osx mountain lion (10.8.3) and when I run the code in the link below, I have a menu with only one action...

https://gist.github.com/Supm4n/8c705154b8586618f4cc

the other strange thing is that when I compile with only one action other than goOnline, I cannot see any menu when I click on the sys tray icon.

My Qt version is 5.0.1

Thanks in advance for your help.

도움이 되었습니까?

해결책

On MacOS Qt treats some "standard" MacOS menu items in special way. You are using "Quit" and "About", which are determined by Qt as "standard" for MacOS.

Detailed description and customization details are provided in official Qt docs for QMenuBar http://qt-project.org/doc/qt-4.8/qmenubar.html

Checkout section "QMenuBar on Mac OS X" under the link above.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top