[Android-development] Forcing native menubar to show

Eskil Abrahamsen Blomfeldt eskil.abrahamsen-blomfeldt at theqtcompany.com
Mon Oct 6 12:31:27 CEST 2014


On 10/06/2014 11:15 AM, maitai at virtual-winds.org wrote:
> That should be possible, yes :) But if you don't want the action bar
>> or react to the physical menu button, then you have to disable the
>> main window's menu bar and just use your own pop-up instead.
>>
>
> Of course I have tried that, the problem is that it doesn't look 
> native at all, and plain ugly in many cases...

Hmm, right, sorry, Qt Widgets is not using QPA for pop-up menus, so that 
won't work.

What you can do then is to use the private API in QPA to create the 
platform menus manually. Take a look at QtGui/qpa/qplatformmenu.h and 
QtGui/qpa/qplatformtheme.h.

-- Eskil




More information about the Android-development mailing list