Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

[SOLVED] General scope question

$
0
0
In simple terms, yes you’re right. To be more precise though, an ID is limited to Component Scope [doc.qt.io]Ahh.. ok that sounds interesting. So items in the main.qml have global ids but the other way round, it is not possible. That’s not possible. You cannot create a global item in QML. Anyway, can you think of a good use-case where you need to have a global item?Hmm, I think I’m lacking in required experience to answer this question, but the way you ask tells me the answer :-P Btw.: On my extensive investigation using google I found another way that could also be useful. When I use a singleton, I can make the component accessable from other files (if I understood that right), but I don’t think that this is the right way for my purposes, because singleton is “more” useful for components which are created lots of times to save memory/performance… Well, thank you for spending a lot of time explaining that stuff to me, I appreciate that much! :-) Cheers,

Viewing all articles
Browse latest Browse all 4972

Trending Articles