Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Blog Post about Creating QML Properties Dynamically at Runtime from C++
strahlex last edited by
Hello, fellow Qt Coders,
I know this is not part of how the QML language is designed. But sometimes it useful to create QML properties at runtime. An example for such a need is, for example, the Qt SCXML state machine for QML, which relies on this feature.
Since I could not find a good explanation on how to do this, I created a write-up for three possible approaches. Using QMetaObject is my favorite.
Please let me know if I overlooked something.