Dear sirs/madams,
It would be useful to have a global object (or a pattern that provides
such without being too verbose).
Let's say I want to refer to "theme" property (a javascript Object),
by using phrase like "global.theme". I can accomplish this in varying
ways, including (but not limited to)
1) setting it from C++ side by setContextProperty
2) having an object up in parent hierarchy
('mainview.theme.defaultTextSize') that I just "know" to be there in
all my .qml files (which is what I do now, but it's messy).
3) storing the global object in .js file with .pragma library. Messy
as well, need extra import, .js needs to be bundled in certain
directory, no property binding, etc.
Any other patterns I missed? Or is this something the framework will
address eventually?
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml