[PyQt] QObject confusion
Jason Hihn
jason at eyemaginations.com
Mon Jul 23 16:23:39 BST 2007
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.
Can anyone offer a suggestion?
Thanks!
class Activation(QObject):
.
def login (self, username, password):
.
#self.connect(self.http, SIGNAL('done(bool)'),
self, SLOT('loginReponseRcvd(bool)'))
self.connect(self.http, SIGNAL('done(bool)'),
self.loginReponseRcvd)
self.http.get(getdata)
print 'login'
def loginReponseRcvd(self, error):
print 'loginReponseRcvd: ', error
if error:
print str(self.http.errorString())
else:
data=str(self.http.readAll())
print 'data:', data
QObject.emit(self,
SIGNAL('loggedIn(bool)'), data=='1')
QApplication.exit(0)
---
Regards,
Jason Hihn
Director of Software Engineering
Eyemaginations, Inc.
600 Washington Ave, Suite #100
Towson, MD 21204
Domestic: 877.321.5481 ext. 8617
International: 410.321.5481 ext. 8617
Fax: 410.616.8657
jason at eyemaginations.com
www.eyemaginations.com
www.3d-eye.com
=================================================
The information transmitted within this email document or fax is intended
only for
the person(s) or entity to which it is specifically addressed and may
contain
confidential and/or privileged material of Eyemaginations. Any re-creation,
review,
distribution, retransmission, dissemination or other use of, or taking of
any action
in reliance upon, this information by persons or entities other than the
intended
parties is completely prohibited. If you have received this email in error,
please
contact the sender or author and permanently delete and destroy the email
from
any computer which houses its contents.
=================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20070723/9fa0a3ea/attachment.html
More information about the PyQt
mailing list