code: def add_layout(self, l):
          
          if self.layout():
              self.layout().addLayout(l)
          else:
              layout = QVBoxLayout(self)
              layout.addLayout(l)
docs: Convenience function