title: How to show a QMainWindow inside a QDialog
body: <p>I am trying to show a QMainWindow inside a QDialog but the former does not appear.</p>
  
  <p>I have subclassed QDialog, let's call it myDialog</p>
  
  <p>A small example:</p>
  
  <pre><code>myDialog(QWidget *p_parent) : QDialog(p_parent)
  {
      QGridLayout *p_dialogLayout = new QGridLayout(this);
  
      QMainWindow *p_MainWindow = new QMainWindow(this);
      QLabel *p_label = new QLabel(this);
      p_MainWindow-&gt;setCentralWidget(p_label);
  
      QPushButton *p_cancel = new QPushButton("Cancel", this);
  
      p_dialogLayout -&gt;addWidget(p_MainWindow, 0, 0);
      p_dialogLayout -&gt;addWidget(p_cancel, 1, 0);
  }
  </code></pre>
  
  <p>If I execute the dialog, I only see the button, not the embeded QMainWindow.
  If i force to show the qmainwindow, the mainwindow is shown in another window.</p>