I am relatively new to the Qt framework and I was wondering if I should delete pointers in my program. I know that, in C++, if memory is not return it could lead to memory leak, but I am not sure if the same applies to Qt.
#include "mainwindow.h"
#include <QApplication>
#include <QTextEdit>
#include <QPushButton>
#include <QVBoxLayout>
#include <QIcon>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QWidget *w = new QWidget();
w->setWindowTitle("Music Player");
QIcon * mainwind_icon = new QIcon("MusicPlayer.png");
w->setWindowIcon(*mainwind_icon);
QPushButton * enter_button = new QPushButton();
QTextEdit * textbox = new QTextEdit();
QHBoxLayout * vlayout = new QHBoxLayout;
vlayout->addWidget(textbox);
vlayout->addWidget(enter_button);
w->setLayout(vlayout);
w -> show();
return a.exec();
}