[Interest] [Qt6] QML notify dynamic property changes from C++

Konstantin Shegunov kshegunov at gmail.com
Sat Mar 5 13:13:44 CET 2022


Hello,
I have exposed some dynamic properties through QQmlPropertyMap to the QML
engine and that works well. However I need to change the values from C++
and want to notify the bindings about the property change from there. Is
there a way to do it?

I attempted to manually emit the valueChanged(), and I can capture the
signal from QML, but that works with the property name and obviously
doesn't update the bindings. Another thing I attempted was to use the
QMetaProperty::write hoping that it's going to bubble up through the QML
layer, which it doesn't, and there doesn't appear to be some specific event
that I could use to push onto the object to force the QML to reevaluate.

Kind regards,
Konstantin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20220305/871b1613/attachment.htm>


More information about the Interest mailing list