Hi,
In the main.cpp I create the main class object. In one of the main class member methods I create a pointer to a data widget, like:
void MainClass::showHelpWidget()
{
HelpWidtet* widget = new HelpWidget(this);
widget->show();
}
The widget will be deleted when returning from the method and will it be removed from parent's child list?
void MainClass::showHelpWidget()
{
HelpWidtet* widget = new HelpWidget(this);
widget->show();
}
The widget will be deleted when returning from the method and will it be removed from parent's child list?
To copy to clipboard, switch view to plain text mode
The helpWidget contains 3 pointer members which are create in the constructor and deleted in the destructor. Will he destructor be called every time I close the app, or should I set the flag "delete on close" for the help widget?
Trivial questions, but still looking for a short explanations.
Thank you.
Bookmarks