[PyQt] QPropertyAnimation called from another thread

Martin Airs camberwell at gmail.com
Sat Aug 14 01:23:00 BST 2010


Well I finally got it working, I just created a QObject to emit a signal 
passing the nick and ip as arguments

class emitter(QtCore.QObject):
     def __init__(self):
         QtCore.QObject.__init__(self)
     def send(self, nick, ip):
         self.emit(QtCore.SIGNAL("mysig(QString,QString)"), nick, ip)

then I connected the signal to myapp.creatUserTile with..

QtCore.QObject.connect(myemitter, 
QtCore.SIGNAL("mysig(QString,QString)"), myapp.createUserTile)

then in the Client thread I can...

myemitter.send(nick,ip)

that enabled me to start the animation from within the parent thread

sorry is this list meant for end user support, or is it more for devs 
and internal matters?

Martin


More information about the PyQt mailing list