Delete objects in Designer
Is there any way to delete objects created using desgner.I hav an application that makes use of a dialog created using Designer.There is some leak in my app so i tried deleting objects in the destructor.But there is no change in memory leak..Any ideas??
Re: Delete objects in Designer
A QObject deletes its children. All child widgets in the dialog get deleted when the dialog itself is deleted. You just have to make sure the dialog gets properly destructed. Notice that it's preferred to allocate a modal dialog on the stack so it gets automatically destructed when going out of scope.
Re: Delete objects in Designer
I am trying to delete the object in the class its being created.I am giving destroy() in the
close event ,does it mean its deleted ..Does Qt take care of the deletion???
Re: Delete objects in Designer
Use C++ delete operator. You don't need to call QWidget::destroy(), it gets called by QWidget destructor.