code: def clearLayout(layout):
      
      while layout.count():
          child = layout.takeAt(0)
          child.widget().deleteLater()
docs: Removes all widgets in the layout. Useful when opening a new file, want
      to clear everything.