dimanche 20 décembre 2015

How to dynamically add/remove QML properties inside C++?

For example, an empty QObject-based class defined in C++. It's created from QML. Then C++ adds some properties to it via setProperty. But they aren't becoming accessible by QML.

Other example: use setContextObject and then start adding properties to that C++ object. No effect on QML.

How to make it work?





Aucun commentaire:

Enregistrer un commentaire