title: Python: How to unassign Layout from GroupBox in PyQt
body: <p>A groupbox:</p>
  
  <pre><code>myGroupBox = QtGui.QGroupBox()
  </code></pre>
  
  <p>and two layouts:</p>
  
  <pre><code>layoutA = QtGui.QVBoxLayout()
  layoutB = QtGui.QVBoxLayout()
  </code></pre>
  
  <p>I assign layoutA to myGroupBox:</p>
  
  <pre><code>myGroupBox.setLayout(layoutA)
  </code></pre>
  
  <p>Later there is a need to re-assign layoutB to myGroupBox:</p>
  
  <pre><code>myGroupBox.setLayout(layoutB)
  </code></pre>
  
  <p>But getting a warning... </p>
  
  <pre><code>QWidget::setLayout: Attempting to set QLayout "" on QWidget "", which already has a layout
  </code></pre>
  
  <p>Is it possible to avoid this warning? How to remove a layout from myGroupBox before attempting to assign another?</p>