Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Auto-wrapping non-QObject types when passing to QML
Igor Baidiuk last edited by
ckielwein last edited by
I am 99% sure this is not possible.
For a type to be usable in QML it's members, how to access them, etc. needs to be made available to the QML engine.
This happens through the QT Meta Object System.
To provide some C++ data or functionality to QML, it must be made available from a QObject-derived class.
You could probably implement a set of macros which combine conventions of your codbase with QT macros to create wrapper types around your types which also derive from QObject.
fcarney last edited by
Have you looked at this page?