Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QJSEngine passing arguments back to c++
I Just can pass when a i create create a c++ classe with a method that returns *this as a datatype.
It was Nice to to catch the console log, like a connect signal instande of creating a custom object for that prupose.
Tanks Ricardo Matos
values from JS to C++ can be handled with the QJSValue type on the C++ side.
But the JS side will never support more types than the engine provides.
Also see this: https://doc.qt.io/qt-5/qtqml-cppintegration-data.html
But can pass a c++ type back to c++ like a QIcon or a QSize if inside my c++ classe i have a invokable method that returns *this.
Is it nota possível to create a qmetatype converter for that class?
I read someware that it was possble to use register meta type converter in old versions of qt but i tryit on Qt 6.2 and is nota working.
Im doing something wrong?
It was Nice to be able to register a meyatype converter and the QJSEngine convert for that object to a data type.
Until now i create a class of QIcon and add and invokable method that returns *this.
Like that i can recive on c++ a QIcon as reference
Is there something that Im missing?