java.lang.Object
io.qt.core.QGenericReturnType<T>
- Type Parameters:
T
-
Specifies a function pointer's return type.
Qt's object types are represented by pointers, value types by values, e.g.:
Java class QWidget
leads to QWidget*
function return type,
Java class QColor
leads to QColor
function return type (as value).
Use asRef()
to return values and objects as reference type (e.g. QColor&
, QObject&
).
Use asConstRef()
to return values and objects as const reference (e.g. const QColor&
).
Use asPointer()
to return values as pointers (e.g. QColor*
).
-
Method Summary
Modifier and TypeMethodDescriptionReturn value or object as const reference (e.g.Return value as pointer (e.g.asRef()
Return value or object as reference (e.g.static <T> QGenericReturnType<T>
Create generic return type from meta type.static <T> QGenericReturnType<T>
of
(QMetaType.Type type) Create generic return type from meta type.static <T> QGenericReturnType<T>
Create generic return type from class type.
-
Method Details
-
asPointer
Return value as pointer (e.g.
QColor*
).- Returns:
- new instance
-
asRef
Return value or object as reference (e.g.
QColor&
,QObject&
).- Returns:
- new instance
-
asConstRef
Return value or object as const reference (e.g.
const QColor&
).- Returns:
- new instance
-
of
Create generic return type from class type.- Type Parameters:
T
-- Parameters:
classType
-instantiations
- only useful to specify template types like QList<T>.- Returns:
- new instance
-
of
Create generic return type from meta type.- Type Parameters:
T
-- Parameters:
metaType
-- Returns:
- new instance
-
of
Create generic return type from meta type.- Type Parameters:
T
-- Parameters:
type
-- Returns:
- new instance
-