using PyQt, I am trying to create an interface for which I can add or remove widget dynamically. I want to define a separate class for the widget that will be added or remov
If u want to say , delete a widget whenever a button is clicked , or during any event of ur program , use the deleteLater() method :self.yourwidget.deleteLater()
self.button.clicked.connect(delete_widget);
def delete_widget(self):
self.widget.deleteLater();
self.widget.deleteLater();
Using the above function makes that widget dissappear from the Application