[PyQt] Listening for ActiveX/COM signals

Sam Myers morefigs at gmail.com
Tue Feb 10 04:22:07 GMT 2015


I'm still having trouble listening for a COM object signal (in this case a
stage callback, with the signature MoveComplete(int).

It seems I first need to get a reference to the MoveComplete event so that
I can connect it to a slot in my code. This doesn't seem easy. *Calls *to
the COM object are made easily, like:

self.dynamicCall('SetHWSerialNum(int)', args)

but there doesn't appear to be an equivalent method for listening for COM
events that takes a string argument with the event name and parameters (e.g.
'MoveComplete(int)') - is there one?

The docs also mention that direct access to the COM object can be gained: "Use
queryInterface() to get access to the raw COM object.", but
queryInterface throws
AttributeError. Is queryInterface implemented in PyQt? Can this be used to
listen for COM events?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150210/e38566d1/attachment.html>


More information about the PyQt mailing list