How to remove a widget on PySide2?
In C ++, this is done in the following way (as I understand it from tutorials) (for example, deleting a button):
delete button;
In Python, a similar construction:
del self.next_btn;
Gives an error message:
Traceback (most recent call last): File "*******.py", line 94, in dell del self.next_btn; AttributeError: next_btn
self
does not have thenext_btn
attribute. Explain in more detail what you are trying to achieve. It is advisable to show a minimal, self-sufficient and reproducible example . - Sergey Gornostaev