Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Extract Context Properties from C++ Code

$
0
0
OK. Parsing the QML is an option, but probably too cumbersome. You would need to do it before loading the QML. Once you load it, it will throw errors on properties that were not included, which is not what you want. What about a “just in time” property inclusion? Instead of adding numerous Q_PROPERTYies, provide an object with something like: Q_INVOKABLE QVariant getProperty(const QString &propertyName); Q_INVOKABLE void setProperty(const QString &propertyName, QVariant value); But this way you will loose all the NOTIFY goodness. Or you could divide your properties into modules and include them in QML using import statements.

Viewing all articles
Browse latest Browse all 4972

Trending Articles