title: Qt: Can't set layout in QMainWindow
body: <p>I am trying to set my layout (using <code>setLayout()</code>) in my mainwindow. It does not show anything on launch:</p>
  
  <pre><code>class MainWindow : public QMainWindow
  {
      Q_OBJECT
  
  public:
      explicit MainWindow(QWidget *parent = 0)
      {
          QVBoxLayout *vBoxLayout = new QVBoxLayout;
          {
              QPushButton *pushButton = new QPushButton(tr("A button"));
              vBoxLayout-&gt;addWidget(pushButton);
          }
          setLayout(vBoxLayout);
      }
  };
  </code></pre>