[Kde-finance-apps] QObject subclass parameter QObject *

Puneet Goyal puneetgoyal08 at gmail.com
Sat Aug 13 21:44:35 UTC 2011


>
>
> > Here while declaring the constructor you passed the QObject* object
> > but while creating object you only call
> >
> > AlkInvoice* alkinvoice =new AlkInvoice();
> > and not
> > AlkInvoice* alkinvoice =new AlkInvoice(qobject);
>
>
> In that case it simply has no parent. The default 0 will be used.
>
>
> Ok thanks, I got it now
That is why we declare it as  AlkInvoice::AlkInvoice(QObject *parent=0)

Regards,
Puneet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-finance-apps/attachments/20110814/0362f08d/attachment.html>


More information about the Kde-finance-apps mailing list