title: Application window on Multi monitor screen and centre placement
body: <p>I've a <code>QMainWindow</code>, which is launched by another application.</p>
  
  <p>The problem is, in a multimonitor setup, the application launching my <code>QMainWindow</code>, might reside on the 3rd screen, but my window will always launch on the first.</p>
  
  <p>I worked around this in the following way...</p>
  
  <pre><code>QDesktopWidget *m = new QDesktopWidget();
  QPoint p= QCursor::pos();
  int r= m-&gt;screenNumber(p); //get the screennumber where the mouse is
  QRect d=m-&gt;screenGeometry(r);
  QPoint l = d.center(); //not the correct solution
  mainWin-&gt;move(l); //move the window to that screen
  mainWin-&gt;show(); //launch
  </code></pre>
  
  <p>Now, how do I launch this window in the centre of the screen. <code>d.center()</code> is not the correct way, as the topleft of the window will launch from the centre point, so it will be obscured.</p>
  
  <p>Kindly advise.</p>