c++ - Opening a new form from an existing one - Is this acceptable -
i opening anew form using following method
void myform::myslot() { //this method loads te form historical feeds newform *w = new newform(); w->show(); }
is way acceptable opening new form. how know when delete w
pointer when form closes ?
what thinking setting signal trigger when form closed. slot of signal delete w. acceptable way or there faster way accomplish ?
set qt::wa_deleteonclose attribute:
w->setattribute(qt::wa_deleteonclose);
this way, qt's memory management system deal you.
Comments
Post a Comment