Hey mahesh,
Just do one thing.
Always Allocate parent object as static memory allocation and allocate child objects as dynamic or static memory allocation whatever you want .
Then you dont have to delete anything as when the application will end up, it automatically deletes object that is allocated through static memory allocation. And there is one feature in Qt that is, if the parent object is deleted then it automatically deletes the child object.
Bookmarks