[PyQt] Connect PyQt to ActiveX events
Florian Bruhin
me at the-compiler.org
Tue Feb 3 05:37:06 GMT 2015
* Sam Myers <morefigs at gmail.com> [2015-02-03 14:54:57 +1100]:
> QObject::connect(object, SIGNAL(MoveComplete(int)), receiver,
> SLOT(someSlot(int)));
>
> But I can't work out the equivalent Python code. None of these work:
>
> self.connect(self, QtCore.SIGNAL('MoveComplete(int)'), self,
> QtCore.SLOT(self.myfunc))
> self.connect(self, QtCore.SIGNAL('MoveComplete(int)'), self.myfunc)
> self.connect(self.MoveComplete(), QtCore.SIGNAL('MoveComplete(int)'), self,
> QtCore.SLOT(self.myfunc))
I don't know anything about ActiveX - but the way this would be done
with a normal signal with the new signal-slot syntax would be:
self.MoveComplete.connect(self.myfunc)
http://pyqt.sourceforge.net/Docs/PyQt5/signals_slots.html#connecting-disconnecting-and-emitting-signals
Florian
--
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150203/15e25358/attachment.sig>
More information about the PyQt
mailing list