Nevermind.I for got to call the base class initializer. i.e. apply(QObject.__init__, (self, ) + ())
_____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Hihn Sent: Monday, July 23, 2007 11:24 AM To: [email protected] Subject: [PyQt] QObject confusion 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 [EMAIL PROTECTED] 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. =================================================
_______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
