<br><div><span class="gmail_quote">On 7/23/07, <b class="gmail_sendername">Jason Hihn</b> <<a href="mailto:jason@eyemaginations.com">jason@eyemaginations.com</a>> 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't entirely clear what was going on ..<br><br>Arve<br> </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;"> </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;"> </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;"> </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;"> </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;">
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;"> …
</span></font></p>
<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
#self.connect(self.http, SIGNAL('done(bool)'), self,
SLOT('loginReponseRcvd(bool)'))</span></font></p>
<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
self.connect(self.http, SIGNAL('done(bool)'), self.loginReponseRcvd)</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;">
</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">
</span></font><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">print 'login'</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;">
def loginReponseRcvd(self, error):</span></font></p>
<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
print 'loginReponseRcvd: ', error</span></font></p>
<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
if error:</span></font></p>
<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
</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">
else:</span></font></p>
<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;" lang="FR">
data=str(self.http.readAll())</span></font></p>
<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;" lang="FR">
</span></font><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">print 'data:', data</span></font></p>
<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
QObject.emit(self, SIGNAL('loggedIn(bool)'), data=='1')</span></font></p>
<p><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
QApplication.exit(0)</span></font></p>
<p><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;">---</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;"> </span></font></p>
</span></div></div>
</div>
<br>_______________________________________________<br>PyQt mailing list <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>