[Qt-interest] show a widget without a main window
Andreas Pakulat
apaku at gmx.de
Tue Mar 10 10:26:01 CET 2009
On 10.03.09 13:57:33, knowledge seeker wrote:
> Sorry for the wrong link.
>
> The correct link is
> http://doc.trolltech.com/4.4/tutorials-tutorial-t5.html
>
> In constructor of MyWidget() please see that
> QPushButton *quit = new QPushButton(tr("Quit"));
>
> Hence there is no this passed as parameter, while creating the quit-object.
>
> Now what do you suggest ?
>
> Does layout->addWidget(quit); take care of the before-mentioned
> parent-child delete-mechanism ??
Just look at the api docs for both methods and you'll see that there's
still no leak in this case (also check QLayout::addItem).
Andreas
--
Green light in A.M. for new projects. Red light in P.M. for traffic tickets.
More information about the Qt-interest-old
mailing list