title: Do I have to delete these pointers?
body: <p>This is the <code>MainWindow</code> class which I call and use the function <code>show()</code> to make it visible to the user. </p>
  
  <pre><code>class MainWindow : public QMainWindow
  {
      Q_OBJECT
  
      QWidget *centralWidget;
      QGridLayout* gridLayout;
      QGridLayout* infoBoxLayout;
      QHBoxLayout* buttonGroup;
      QHBoxLayout* subCategoryLayout;
      //... more widgets
  
  public:
      MainWindow(QWidget *parent = 0);
      ~MainWindow();
  
      void setupUi();
      void setupConnections();
  
  private slots:
      void add();
      void edit();
      void remove();
      void find();
      void clearAll();
      void screenshotDesktop();
      void screenshotApp();
  
      void currentSubCategoryChanged( const QString&amp; );
      void curretCategoryChanged( const int );
  
      void keyPressEvent( QKeyEvent * );
  
  };
  </code></pre>
  
  <p>I created for each widget (those pointers after the macro <code>Q_OBJECT</code>) a new object on the heap with <code>new</code>. However, I did not delete them anywhere in the program. Does this cause a memory leak in Qt? Or does something from Qt delete them automatically when destroying the class? </p>