title: PyQt How to remove a layout from a layout
body: <pre><code>datainputHbox = QHBoxLayout()
  layout = QVBoxLayout(self)
  layout.addLayout(datainputHbox)
  
  
  pagedatainputdeletboxbutton1.clicked.connect(lambda:self.boxdelete(datainputHbox))
  
  def boxdelete(self, box):
  </code></pre>
  
  <p>This is the PyQt proragm
  How write boxdelete funtion in order to remove datainputHbox form layout. I try a lot of. However I just can remove all the widgets but cannot remove layout.</p>