Is is possible to get native menus with Qt4 on Windows 7, 64-bit?

自古美人都是妖i 提交于 2020-01-01 05:40:10

问题


Applications written in Qt (4) do not have native menus when run on Windows 7, 64-bit. This is true for well-known applications as VLC, Lyx, etc.

Qt menus do not behave as native menus, which can be annoying. As an example, consider the screenshot below.

If the mouse is rapidly moved along the red path, the sub menu will close immediately. For native menus in Windows (and on Macs) there is a delay. This can make it difficult to navigate in the menus, as they will not behave as the user expects.

Is it possible to get native menus in Windows instead?


回答1:


In Qt5 there's a QPA API for the menus - it is used to create the native Mac menus. It will probably be used on Android soon, and a Windows implementation would be entirely possible. Back-porting to Qt4 would be complex, since the native Mac-menus support was achieved via #ifdefs



来源:https://stackoverflow.com/questions/10931464/is-is-possible-to-get-native-menus-with-qt4-on-windows-7-64-bit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!