title: Qml C++ Find Child
body: <p>I have a main.qml with a MainPage.qml inserted through:</p>
  
  <pre><code>initialPage: MainPage {tools: toolBarLayout}
  </code></pre>
  
  <p>because I choose to make it for Symbian. When i try:</p>
  
  <pre><code>QObject *mainPage = rootObject-&gt;findChild&lt;QObject*&gt;("MainPage");
  if (mainPage)
      QDeclarativeProperty(mainPage, "toets").write(3);
  </code></pre>
  
  <p>the message doesn't come through but there are no errors, I have also tried connecting a SIGNAL to a SLOT on MainPage with the "if (mainPage)" but it also has no response. I have managed to get a signal through to main though but when I try:</p>
  
  <pre><code>function changeNum(num)
  {
       MainPage.changeNum(num)
  }
  </code></pre>
  
  <p>The function never gets executed because I don't get a message from console.log at all unlike I do when the function on main runs. I also know the other methods didn't work because the also didn't log a message or execute the rest of their function.</p>
  
  <p>I think the problem might lie in MainPage not being created as an element with a id. Do you know what might be causing this?</p>