title: How to delete an already existing layout on a widget?
body: <blockquote>
    <p>You must first <strong><em>delete the existing layout manager (returned by
    layout())</em></strong> before you can call setLayout() with the new layout.</p>
  </blockquote>
  
  <p>from <a href="http://doc.qt.io/qt-5.9/qwidget.html#setLayout" rel="noreferrer">http://doc.qt.io/qt-5.9/qwidget.html#setLayout</a></p>
  
  <p>Which function is used for deleting the previous layout?</p>