[Development] potential bug with qml context properties

Matt Broadstone mbroadst at gmail.com
Fri Sep 20 15:57:47 CEST 2013


Hi,
I'm running into a strange error related to context properties in qml.
Basically, I'm trying to expose a QQmlPropertyMap into the context of my
QQmlApplicationEngine, and within the qml set up a "recursive" binding so
that changes to that map from C++ are expressed in qml, and vica versa.
This was not difficult to achieve, however, I keep getting ReferenceErrors
stating that the context property is not defined (even though setting
singleshot timer to change the map indeed reflects a change in the qml
scene), not to mention a slightly less annoying (but annoying nonetheless)
warning that I've set up a recursive binding. I'm wondering if this is a
bug, or if I'm just doing something wrong.

I have a very simple example of what I'm trying to do posted on these two
pastebins, if someone has a second to take a look that'd be great:

(c++) http://pastebin.com/S7XeYHEG
(qml) http://pastebin.com/THsPsVkM

Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130920/2b002075/attachment.html>


More information about the Development mailing list