title: qml use element id in another file
body: <p>I have 3 files: </p>
  
  <p>mainWindow.qml</p>
  
  <pre><code>       Rectangle{
              id: container
  
          Services{
              id: loger
          }
          ...//there is element code
   }
  </code></pre>
  
  <p>CategoryDelegate.qml</p>
  
  <pre><code>Item {
      id: delegate
  ...//there is element code
  }
  </code></pre>
  
  <p>and MovieDialog.qml</p>
  
  <pre><code>Rectangle {
          id: movieDialog
  ...//there is element code
  }
  </code></pre>
  
  <p>I need to use Services function in moviedialog and categorydelegate. From category delegate i can use it</p>
  
  <pre><code>Item {
      id: delegate
  
  property string type: container.loger.getMovie(1)
  //this code works well
  }
  </code></pre>
  
  <p>But from moviedialog i cannot accept it!</p>
  
  <pre><code>Rectangle {
          id: movieDialog
  
  property string type: container.loger.getMovie(1)
  //this will not work
  }
  </code></pre>
  
  <p>And i get error: "TypeError: Cannot call method 'getMovie' of undefined".</p>
  
  <p>How can i fix it?
  Thanks in advance!</p>