Closed daravi closed 4 years ago
I like when i read in a qml file root.someproperty
. I always know it is some kind of property exposed to the user.
It also help to be consistent across multiple file. You always know that root is the top hierarchy item. Where as someComponent
isn't that obvious.
Ok thanks!
My worry was that if I forget to call it root then the parent component will be referenced instead (because that one is also called root and is now visible). But I guess if I am consistent then that shouldn’t happen and there is value in immediately knowing that root means the top level item.
I'm wondering what is the reasoning behind this guideline:
Why not have each file have an id that describes them?
As opposed to the generic
root
?