I need remove item in layout in scroll area, Because I want to update the items None of the following methods worked for me
for i in reversed(range(self.verticalLayout_2.count()):
x = self.verticalLayout_2.itemAt(i).widget()
x.deleteLater()
.
for i in reversed(range(self.verticalLayout_2.count()):
x = self.verticalLayout_2.itemAt(i).widget().deleteLater()
This is out error:
AttributeError: 'NonyType' object has no attribute 'deleteLater'
Just for information, I am importing a ui file to run the PySide2 interface