|
|
On Sep 20, 2007, at 10:41 AM, matteo wrote:
I see in Qt documentation examples where there are new of qt
objects but not delete.
Is it correct?
Why?
In Qt if you specify parent for QObject, then it's automaticly
destroyed when parent is destroyed. So if you have only one main
window, and inside of it you will create bunch of "new" widgets with
parent set to your main window, then with example:
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MyMainWindow window;
window.show();
return app.exec();
}
all children of window will be deleted automaticly when your
application quits.
--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/
|
|