[Development] QTCS2019 Notes from QtQml session
Mathias Hasselmann
mathias at taschenorakel.de
Sun Dec 1 00:07:01 CET 2019
Am 25.11.2019 um 15:39 schrieb André Somers:
>
> On 25-11-19 12:31, Ulf Hermann wrote:
>>> I think one of the biggest problems is that ID resolution crosses
>>> file boundaries. This essentially means that the ids chosen can very
>>> easily become part of the "API" of a component unless you are very
>>> vigilant to not allow that to happen.
>> Well, yes, and there is an easy way to fix this: Deprecate id lookup
>> across file scope. id lookup is actually the same as context property
>> lookup right now. That's what you're seeing there. We cannot get rid of
>> IDs, obviously, but we can restrict their use to the file context and
>> not search the whole context hierarchy.
>
>
> Yeah, that's going to make using QML in actual applications a whole
> lot harder. For instance, sometimes access to some root node is needed
> even from deep leaf files. Removing that capability is quite a drastic
> measure.
Create a singleton for that root object properties that have to be
globally accessible.
Additionally we have these attached properties which can serve a similar
purpose.
Ciao
Mathias
More information about the Development
mailing list