ThibH
1/21/2018 - 6:56 AM

Remove all widgets from Layout

while layout.count():
    child = layout.takeAt(0)
    if child.widget():
        child.widget().deleteLater()
for i in reversed(range(layout.count())): 
    layout.itemAt(i).widget().setParent(None)