[Android-development] Questions related to QMenuBar and Android native menu

maitai at virtual-winds.org maitai at virtual-winds.org
Thu Mar 13 11:42:49 CET 2014


Maybe this is not the correct place to ask such a question? Should I 
post this in the Interest mailing-list?

Sorry if it was not the correct place.
Philippe.

Le 12-03-2014 10:15, maitai at virtual-winds.org a écrit :
> Hello,
> 
> I need some explanations and hints on the way QMenuBar is seen as the
> Android native menu on Android (i.e. accessible through the menu key on
> the device).
> 
> I have created a QMenuBar *, which when running on Android I do not set
> as the QMainWindow's menubar. Magically, it becomes the native menu on
> Android, although I didn't ask anything like qApp::setMenubar() or
> something similar. It works perfectly, but I would like to ask the
> following questions:
> 
> - my QMenuBar becomes the Android's native menubar just because it's 
> the
> first one created in the application?
> - What if I create a second menuBar and want to switch from one to
> another depending on context? Is there a way to specify which menubar 
> is
> the active one?
> - I would like to have some QAction at the first level of the android
> menu (i.e. some subMenus plus some QActions at the same first level).
> AddAction() is not supported in a menuBar, so I tried to insert an 
> empty
> QMenu and play with its menuAction but didn't achieve anything good. Is
> there a way to do this?
> 
> Any help or comment would be greatly appreciated
> 
> Thanks
> Philippe Lelong.
> _______________________________________________
> Android-development mailing list
> Android-development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/android-development



More information about the Android-development mailing list