On the “Scope and Naming Resolution” page (http://qt-project.org/doc/qt-5/qtqml-documents-scope.html) there’s an example using “PathView.scale” that has me confused. Shouldn’t the “id: root’ be on the delegate (Component) instead of on its child (Rectangle)? I thought that attached properties were only reachable on direct children, not on their descendants, so “root.PathView.scale” shouldn’t work and it should instead need to be “root.parent.PathView.scale”. Or have I misunderstood the example?
↧