Delete all items inside a layout
for i in reversed(range(self.layout.count())): self.layout.itemAt(i).widget().close()