<br><div><span class="gmail_quote">On 7/23/07, <b class="gmail_sendername">Jason Hihn</b> &lt;<a href="mailto:jason@eyemaginations.com">jason@eyemaginations.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

















<div link="blue" vlink="purple" lang="EN-US">

<div>

<p><font color="blue" face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; color: blue;">Nevermind…I for got to call the
base class initializer.</span></font></p>

<p><font color="blue" face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; color: blue;">i.e. apply(QObject.__init__, (self, ) +
())</span></font></p></div></div></blockquote><div>Aha, that was the next suggestion on my list :] But it wasn&#39;t entirely clear what was going on ..<br><br>Arve<br>&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US"><div><div><div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><hr align="center" size="2" width="100%">

</span></font></div>

<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
<a href="mailto:pyqt-bounces@riverbankcomputing.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">pyqt-bounces@riverbankcomputing.com</a>
[mailto:<a href="mailto:pyqt-bounces@riverbankcomputing.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">pyqt-bounces@riverbankcomputing.com</a>] <b><span style="font-weight: bold;">On
Behalf Of </span></b>Jason Hihn<br>
<b><span style="font-weight: bold;">Sent:</span></b> Monday, July 23, 2007 11:24
AM<br>
<b><span style="font-weight: bold;">To:</span></b> <a href="mailto:pyqt@riverbankcomputing.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">pyqt@riverbankcomputing.com</a><br>
<b><span style="font-weight: bold;">Subject:</span></b> [PyQt] QObject confusion</span></font></p>

</div><div><span class="e" id="q_113f3d36326b3aa7_1">

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">In the class below (where I use … for brevity) when I
have the Activation class not as a QObject but as a plain python class, the
loginReponseRcvd() gets called. As soon as I make it a QObject (so I can emit)
it stops working. The commented out line I tried and it told me that the
underlining C++ object was deleted…</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">&nbsp;</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">Can anyone offer a suggestion?</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">Thanks!</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">&nbsp;</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">&nbsp;</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">&nbsp;</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">class Activation(QObject):</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">…</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
def login (self, username, password):</span></font></p>

<p style="margin-left: 0.5in; text-indent: 0.5in;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">&nbsp;…&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
#self.connect(self.http, SIGNAL(&#39;done(bool)&#39;),&nbsp; self,
SLOT(&#39;loginReponseRcvd(bool)&#39;))</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
self.connect(self.http, SIGNAL(&#39;done(bool)&#39;),&nbsp; self.loginReponseRcvd)</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">&nbsp;</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;" lang="DE">self.http.get(getdata)</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;" lang="DE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">print &#39;login&#39;</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
def loginReponseRcvd(self, error):</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
print &#39;loginReponseRcvd: &#39;, error</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if error:</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;" lang="FR">print str(self.http.errorString())</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;" lang="FR">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
else:</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;" lang="FR">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
data=str(self.http.readAll())</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;" lang="FR">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">print &#39;data:&#39;, data</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
QObject.emit(self, SIGNAL(&#39;loggedIn(bool)&#39;), data==&#39;1&#39;)</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
QApplication.exit(0)</span></font></p>

<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">&nbsp;</span></font></p>

<p style="margin: 0in 0in 0.0001pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">---</span></font></p>

<p style="margin: 0in 0in 0.0001pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">Regards,<br>
<br>
Jason Hihn</span></font></p>

<p style="margin: 0in 0in 0.0001pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">Director of Software Engineering<br>
Eyemaginations, Inc.<br>
<br>
600 Washington Ave, Suite #100<br>
Towson, MD
 21204<br>
Domestic: 877.321.5481 ext. 8617<br>
International: 410.321.5481 ext. 8617<br>
Fax: 410.616.8657<br>
<a href="mailto:jason@eyemaginations.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">jason@eyemaginations.com</a><br>
<a href="http://www.eyemaginations.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">www.eyemaginations.com</a><br>
<a href="http://www.3d-eye.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">www.3d-eye.com</a><br>
<br>
=================================================<br>
The information transmitted within this email document or fax is intended only
for </span></font></p>

<p style="margin: 0in 0in 0.0001pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">the person(s) or entity to which it
is specifically addressed and may contain </span></font></p>

<p style="margin: 0in 0in 0.0001pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">confidential and/or privileged
material of Eyemaginations. Any re-creation, review, </span></font></p>

<p style="margin: 0in 0in 0.0001pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">distribution, retransmission,
dissemination or other use of, or taking of any action </span></font></p>

<p style="margin: 0in 0in 0.0001pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">in reliance upon, this information by
persons or entities other than the intended </span></font></p>

<p style="margin: 0in 0in 0.0001pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">parties is completely prohibited.
If you have received this email in error, please </span></font></p>

<p style="margin: 0in 0in 0.0001pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">contact the sender or author and
permanently delete and destroy the email from </span></font></p>

<p style="margin: 0in 0in 0.0001pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">any computer which houses its
contents. </span></font></p>

<p style="margin: 0in 0in 0.0001pt;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">=================================================</span></font></p>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

</span></div></div>

</div>


<br>_______________________________________________<br>PyQt mailing list &nbsp; &nbsp;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">
http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br></blockquote></div><br>