[Qt-interest] show a widget without a main window

Knowledge Seeker knowledgeseeker78 at gmail.com
Thu Mar 5 02:43:03 CET 2009


Is not there a memory leak? there is no
delete w;
And also object 'w' is not linked to the parentobject - QApplication, so 
it cant be automatically deleted !!


Regards,
Knowledge Seeker

Malyushytsky, Alex wrote:
>
> Most of Qt examples are not using main window. Example look like this:
>
> #include <QtGui>
>
> #include "myWidget.h"
>
> //! [main function]
>
> int main(int argc, char *argv[])
>
> {
>
> QApplication app(argc, argv);
>
> myWidget *w = new myWidget;
>
> w->show();
>
> return app.exec();
>
> }
>
> Regards
>
> Alex Malyushyutsky
>
> ------------------------------------------------------------------------
>
> *From:* qt-interest-bounces at trolltech.com 
> [mailto:qt-interest-bounces at trolltech.com] *On Behalf Of 
> *ri at eeda.denso.co.jp
> *Sent:* Tuesday, March 03, 2009 8:56 PM
> *To:* qt-interest at trolltech.com
> *Subject:* [Qt-interest] show a widget without a main window
>
> Hi
>
> I would like to know that if it's possible to show a widget without a 
> main window.
>
> For example, I want to show a QTableWidget, but only a QTableWidget,
>
> not a QTableWidget inside a QMainWindow.
>
> Is it possible? if yes, any sample code?
>
> Thanks in advance!
>
> Shiniji,Mizuki
>
>
>
> ---------------------------------------------------------------------------------------------------
> Weidlinger Associates, Inc. made the following annotations.
>
> “This message and any attachments are solely for the intended 
> recipient and may contain confidential or privileged information. If 
> you are not the intended recipient, any disclosure, copying, use, or 
> distribution of the information included in this message and any 
> attachments is prohibited. If you have received this communication in 
> error, please notify us by reply e-mail and immediately and 
> permanently delete this message and any attachments. Thank you.”
>
> “Please consider our environment before printing this email.”
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>   




More information about the Qt-interest-old mailing list