The QAndroidJniEnvironment provides access to the JNI Environment. 更多...
| 頭: | #include <QAndroidJniEnvironment> |
| qmake: | QT += androidextras |
| Since: | Qt 5.2 |
| QAndroidJniEnvironment () | |
| ~QAndroidJniEnvironment () | |
| operator JNIEnv * () const | |
| JNIEnv * | operator-> () |
| JavaVM * | javaVM () |
The QAndroidJniEnvironment provides access to the JNI Environment.
構造新的 QAndroidJniEnvironment object and attach the current thread to the Java VM.
bool exceptionCheck()
{
/*
The QAndroidJniEnvironment attaches the current thread to the JavaVM on
creation and detach when it goes out of scope.
*/
QAndroidJniEnvironment qjniEnv;
return qjniEnv->ExceptionCheck();
}
分離當前綫程從 Java VM 和銷毀 QAndroidJniEnvironment 對象。
[static]
JavaVM
*QAndroidJniEnvironment::
javaVM
()
返迴 Java VM 接口。
返迴 JNI 環境指針。
提供訪問 QAndroidJniEnvironment 的 JNIEnv 指針。