title: Why does QDialog::exec() move the window to the left upper corner of the screen after QMessageBox::warning(...)?
body: <p>I have the following sequence of actions:</p>
  
  <pre><code>//MyDialog inherits QDialog and I constuct this dialog with parent = 0
  MyDialog* myDialog = new MyDialog(); 
  myDialog-&gt;exec();
  myDialog-&gt;Return();
  myDialog-&gt;exec();
  </code></pre>
  
  <p>During first call of exec the dialog is shown at the center of the screen. Then function <code>Return</code> shows <code>QMessageBox::warning</code> (with parent = 0). Then second <code>exec</code> call shows the dialog at the left upper corner of the screen (I want it be at the center of the screen again). If <code>Return</code> function doesn't show <code>QMessageBox::warning</code>, the second <code>exec</code> call shows the dialog at the center. Why does <code>QMessageBox</code> spoil this behaviour of <code>QDialog::exec</code>? And how can I fix it in my program? (I don't want to create this dialog again, I just want to show it second time)</p>
  
  <p>I have noticed that with bigger dialog window size it works perfect... </p>
  
  <p><strong>Update:</strong> Actually I can replace <code>myDialog-&gt;Return();</code> with <code>QMessageBox::warning(0, "title", "message");</code> and I will be having the same problem. So the next code</p>
  
  <pre><code>MyDialog* myDialog = new MyDialog(); 
  myDialog-&gt;exec();
  QMessageBox::warning(0, "title", "message");
  myDialog-&gt;exec();
  </code></pre>
  
  <p>contains the same problem. In other words, there is problem with <code>QDialog::exec</code> and <code>QMessageBox</code>, but not with <code>myDialog-&gt;Return();</code></p>
  
  <p>P.S. I use Debian with Gnome 3 and Qt 5.2. I created MyDialog in QtCreator using Add New... -> Qt Designer Form Class -> Dialog with buttons right</p>