maverick_pol
12th November 2008, 14:14
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?
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.
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?
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.