hi, last time i ask you about create several QPushButtons and connect these buttons with slots. Today want ask you to delete these buttons.
I create buttons and store their pointer to struct like: createdB[i] = new QPushButton;
When i destroy button i call: delete createdB[i]; it is OK, but ..
when a create for example a QMenu for QPushButton: QPushButton->setMenu(new QMenu); or insert same widget: QPushButton->layout->addWidget(..);
is it corect when i call only: delete createdB[i]; or i MUST call "delete" for everything what is create for button: delete QPushButton->layout...; delete QPushButton->menu..; and finally: delete createdB[i];
i'am not sure about this. thanks.
Bookmarks