Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QJniObject Class Reference

\inmodule QtCore More...

+ Collaboration diagram for QJniObject:

Related Symbols

(Note that these are not member symbols.)

bool operator== (const QJniObject &o1, const QJniObject &o2)
 Returns true if both objects, o1 and o2, are referencing the same Java object, or if both are NULL.
 
bool operator!= (const QJniObject &o1, const QJniObject &o2)
 Returns true if o1 holds a reference to a different object than o2.
 

Detailed Description

\inmodule QtCore

Since
6.1

A convenience wrapper around the Java Native Interface (JNI).

The QJniObject class wraps a reference to a Java object, ensuring it isn't garbage-collected and providing access to most JNIEnv method calls (member, static) and fields (setter, getter). It eliminates much boiler-plate that would normally be needed, with direct JNI access, for every operation, including exception-handling.

Note
This API has been designed and tested for use with Android. It has not been tested for other platforms.
See also
QJniEnvironment

Friends And Related Symbol Documentation

◆ operator!=()

bool operator!= ( const QJniObject & o1,
const QJniObject & o2 )
related

Returns true if o1 holds a reference to a different object than o2.

◆ operator==()

bool operator== ( const QJniObject & o1,
const QJniObject & o2 )
related

Returns true if both objects, o1 and o2, are referencing the same Java object, or if both are NULL.

In any other cases false will be returned.


The documentation for this class was generated from the following file: