def update(self):
    self.layout().removeWidget(self.child)
self.child.setParent(None)
self.child = QLabel('bar', self)
self.layout().addWidget(self.child)
How to dynamically change child widgets with Python and Qt?