Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

Qt menu example

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?

like image 883
Petter Avatar asked Jun 07 '12 12:06

Petter


1 Answers

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

like image 155
James Turner Avatar answered Nov 15 '22 07:11

James Turner