Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
JObject Class Reference

\inmodule QtCore More...

Collaboration diagram for JObject:

Detailed Description

\inmodule QtCore

The JObject template in the QtJniTypes namespace is the base of declared Java types.

Since
Qt 6.8

JObject<Type> is a template class where Type specifies the Java type being represented.

This template gets specialized when using the Q_DECLARE_JNI_CLASS macro. The specialization produces a unique type in the QtJniTypes namespace. This allows the type system to deduce the correct signature in JNI calls when an instance of the specialized type is passed as a parameter.

Instances can be implicitly converted to and from QJniObject and jobject, and provide the same template API as QJniObject to call methods and access properties. Since instances of JObject know about the Java type they hold, APIs to access static methods or fields do not require the class name as an explicit parameter.

See also
Q_DECLARE_JNI_CLASS

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