QJniObject::construct -> how to use?
-
I´m trying to build an object from a java class via
https://doc.qt.io/qt-6/qjniobject.html#constructThing is, I don´t understand the notation
template <typename Class, typename Args> QJniObject QJniObject::construct(Args &&... args)Also not with the supplied explanation beneath it.
I also get a complaint, when pasting the example (is it even an example?) in my file
QJniObject javaString = QJniObject::construct<jstring>();Does someone know how it has to look, if there is a "MyJavaClass" with no arguments for the constructor?
best regards :)
-
I´m trying to build an object from a java class via
https://doc.qt.io/qt-6/qjniobject.html#constructThing is, I don´t understand the notation
template <typename Class, typename Args> QJniObject QJniObject::construct(Args &&... args)Also not with the supplied explanation beneath it.
I also get a complaint, when pasting the example (is it even an example?) in my file
QJniObject javaString = QJniObject::construct<jstring>();Does someone know how it has to look, if there is a "MyJavaClass" with no arguments for the constructor?
best regards :)
@Flaming-Moe
QJniObject::construct<jstring>()will be correct for "no arguments to constructor", else you would have to specify them inside the(...).I also get a complaint
Might help us if you showed the "complaint" message....