title: Get QWidget absolute position in the MainWindow constructor
body: <p>I want to get the absolute x and y coordinates of a frame control. I know that there is a <code>QWidget::mapToGlobal</code> function that should give me these coordinates - but it always returns the relative points.</p>
  
  <p>My code is:</p>
  
  <pre><code> int y = ui-&gt;frame-&gt;mapToGlobal(ui-&gt;frame-&gt;window()-&gt;pos()).y();  
  </code></pre>
  
  <p>Can anyone please help me to understand what I am doing wrong?</p>
  
  <p>EDIT:
  Found the problem - I've called this line in the main window class, before it is displayed. So now my Q is how can I get the position that the main window <strong>will be</strong> displayd in its constructor? </p>