title: Fullscreen for QDialog from within MainWindow only working sometimes
body: <p>(Testing with C++ on Qt 4.8 and Ubuntu 12.10 unity)</p>
  
  <p>I've got a main window which displays a QDialog. When I put the Dialog window full-screen it does not seem to always work even though it seems to be a proper window.
  Meaning, the window can appear full-screen, though only sometimes.</p>
  
  <p>Anyone got an idea? I know Qt states it might not work for all X environments, but it can't be that bad, can it?</p>
  
  <pre class="lang-cpp prettyprint-override"><code>MainWindow::MainWindow(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::MainWindow)
  {
      ui-&gt;setupUi(this);
      QDialog* d = new QDialog();
      d-&gt;setModal(false);
      d-&gt;show();       
      qDebug() &lt;&lt; d-&gt;isWindow();
  
      // works most of the times, though not always:
      // d-&gt;showFullScreen();
  
      // sometimes works, sometimes it doesn't:
      QTimer::singleShot(2000, d, SLOT(showFullScreen()));
  }
  </code></pre>