I am loading a QML document with the following structure:

A {
  B {

  }
  B {

  }
}

At some point in the application I am iterating over all B components and
want to do:
    qmlContext(B)->setContextProperty("bla", "value")

I need to assign different values to each instance of B. But I get the warning:
    QQmlContext: Cannot set property on internal context.

Questions:

1. The "internal context" surprises me. Does QQmlEngine
   create a new sub-context for each component?

2. Why is this "internal" context not writable? Is this documented
   somewhere?

3. Does anybody know a work-around? I tried to set the property
   on B with QObject::setProperty(), but that isn't recognised
   (bindings are not re-evaluated).

Thanks
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to