title: Why can't I add a QGridLayout to a QMainWindow?
body: <p>I've created a <code>QMainWindow</code> class. I coded a <code>QGridLayout</code> for the main layout, but whenever I add <code>setLayout(grid);</code> this error comes up:</p>
  
  <pre><code>QWidget::setLayout: Attempting to set QLayout "" on MainWindow "", which already has a layout
  </code></pre>
  
  <p>As far as I know, I haven't added any sort of layout in my code before.</p>
  
  <p>I'm using Qt Creator and using Linux (ubuntu 12.10).</p>