[Qt-creator] What is the correct way of removing UI elements with code ?

Murphy, Sean M. sean.murphy at gd-ais.com
Wed Oct 10 18:59:56 CEST 2012

> > I have just encountered a problem, where I do not need a certain UI
> > element e.g. QPushButton and I would like to remove it but since I
> > have connected it with several slots (e.g. clicked(), released() etc.
> > ) I now have several references of this button in my code.
> >
> > How can I remove all of this efficiently ? Do I have to remove it all
> > manually ?
> >
> Two things.
> (1) This is a question for qt-interest; this list is for issues
> concerning the IDE itself, not the toolkit.

This may not be a question for qt-interest.  I think he's asking the question: 

"I thought I was going to need a QPushButton in my code, so I put one in, and started connecting its signal to slots all over my code.  Now I've refactored and decided I no longer need that object.  Is there a simple way to remove all references to it in my code using some Qt Creator functionality?"

So I think maybe he's asking if there's similar functionality to "find all references" that is "remove all references"?


More information about the Qt-creator mailing list