title: QML Screen Coordinates of Component
body: <p>If I have a simple, self-contained QML application, I can get the absolute screen coordinates of a component by saying</p>
  
  <pre><code>Component.onCompeted: {    
      var l = myThing.mapToItem(null, 0, 0)
      console.log("X: " + l.x + " y: " + l.y)
  }
  </code></pre>
  
  <p>where myThing is the id of any other component in the file. However, if this file gets incorporated into another QML file and the component it defines is reused, I don't get the screen coordinates anymore; I get the local coordinates relative to the component where the statements above are executed.</p>
  
  <p>How can I get the absolute screen coordinates of items?</p>