See http://qt-project.org/doc/qt-5.0/qtqml/qtqml-documents-scope.html#component-scope and http://qt-project.org/doc/qt-5.0/qtquick/qtquick-performance.html#bindings for information about evaluation scope.
If you want children to be able to access a property, you can declare that property in the root object in the component scope, or as a context property.
Alternatively, use a Singleton (clearer since you have to prefix usages with the typename, and more optimizable in general).
Cheers,
Chris.
↧