Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Create QML object dynamically from C++
-
I have a QML component defined in C++ class.
#ifndef MYITEM_H #define MYITEM_H #include <QObject> #include <QtQuick> class MyItem : public QQuickItem { Q_OBJECT public: explicit MyItem(); }; #endif // MYITEM_H
How to dynamically create instance of this object in C++ and pass it do QML GUI?
-
Could you describe your use-case?