开发者

Qt and native menus

Does Qt support interaction with the native menu bar of an arbitrary window (i. e. QWidget) on Windows and Linux?

It looks like Qt treats the menu as just another child widget to be placed on the parent window. That is, to have a menu bar , I must reserve some space for it in the window's client area. That makes no sense on Mac, with its menu on the top of the screen. On Windows, it makes little sense -开发者_JAVA百科 the menu, as implemented by the system, is outside of the client area. Not sure what's the native model on Linux.


Qt supports native menues on Mac and on Windows. It may seem when looking at the forms in Qt Designer, that Qt menues on Mac are non-standard, but they aren't. Qt had made a great deal to deal with menue differences between the supported platforms and they work very well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜