Hello everyone i am a newbie to this form and to qt world and i have a simple question which is how to make my class auto deletes its members by accepting a parent

Qt Code:
  1. class Myform : public QWidget
  2. {
  3. Q_OBJECT
  4.  
  5. public:
  6.  
  7. Myform()
  8. {
  9. b=new QPushButton("OK",this);
  10. l=new QLineEdit(this);
  11. mylabel=new QLabel(this);
  12. }
  13.  
  14. ~Myform()
  15. {
  16.  
  17. }
  18.  
  19. private:
  20.  
  21. QLabel *mylabel;
  22.  
  23. };
To copy to clipboard, switch view to plain text mode