<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><br>
> Here while declaring the constructor you passed the QObject* object<br>
> but while creating object you only call<br>
><br>
> AlkInvoice* alkinvoice =new AlkInvoice();<br>
> and not<br>
> AlkInvoice* alkinvoice =new AlkInvoice(qobject);<br>
<br>
<br>
</div>In that case it simply has no parent. The default 0 will be used.<br>
<div class="im"><br><br></div></blockquote><div>Ok thanks, I got it now</div><div>That is why we declare it as  <span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><font class="Apple-style-span" color="#3366ff">AlkInvoice::AlkInvoice(QObject *parent=0)</font></span></div>
<div><font class="Apple-style-span" color="#3366ff" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse; ">Regards,</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse; ">Puneet</span></font></div><meta http-equiv="content-type" content="text/html; charset=utf-8"></div>