Most efficient global property implementation in QML
|Added at||2016-12-29 20:12|
I am currently using properties, declared in the root qml file, and they work globally, because of dynamic scoping, but I am worrying that eventually they will pose too much lookup overhead, especially as the object tree grows deeper, which it eventually will.
There is also the possibility to use a context property object, however that increases verbosity, and also:
From what I've read singletons should be even more efficient in terms of lookup performance, but they are even more verbose - requiring both import statements and accessing individual properties as singleton members rather than directly, and last but not least there is also the age old yet still unfixed QTBUG-34418 which is detrimental when using QML over network.
So what would be the most efficient way to implement a set of global properties in QML, considering the following criteria: