[Android-development] Forcing native menubar to show
maitai at virtual-winds.org
maitai at virtual-winds.org
Thu Apr 3 19:39:31 CEST 2014
Coming back on this:
I have investigated using QtAndroid (5.3.0-beta1) to achieve that and I
guess this is the way to go.
I have tried various things involving QAndroidJniObject,
QAndroidJniEnvironment and QtAndroid::androidActivity(), but didn't
succeed to get what I want.
For instance:
QAndroidJniObject activity=QtAndroid::androidActivity();
bool b=QAndroidJniObject::isClassAvailable("android/app/Activity");
qWarning()<<"class available?"<<b;
//QAndroidJniObject activity("android/app/Activity");
if(activity.isValid())
{
qWarning()<<"activity is valid";
activity.callMethod<void>("openOptionsMenu","()V");
}
I guess my approach is too simplistic but I couldn't google any good
example to do this..
Any help or hint would be really appreciated
Thanks
Philippe LELONG
Le 01-04-2014 15:27, maitai at virtual-winds.org a écrit :
> Hello,
>
> I have a QMenubar which became "native" on android, all is good. I
> would
> like to know if it's possible somehow to trigger it programatically?
>
> I have tried various menuBar->show() or submenu->exec()... apparently
> no
> way.
>
> The reason I am trying to do that is that I want to show a "native"
> contextual menu on tap-and-hold, the current QMenu that I can popup
> does
> not look "android" enough to me...
>
> 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