[PyQt] Unable to connect an QAxObject signal because of IDispatch type

Phil Thompson phil at riverbankcomputing.com
Sun Mar 11 13:57:50 GMT 2018


On 10 Mar 2018, at 8:05 am, Neville Mehta <neville at jemoody.com> wrote:
> 
> The following code:
> 
> Ax = QAxObject('XTAPI.TTInstrNotify')
> Ax.OnNotifyFound.connect(self.OnNotifyFound)
> 
> breaks with the message:
> 
> TypeError: C++ type 'IDispatch*' is not supported as a signal argument type
> 
> because Ax.generateDocumentation() says:
> 
> void OnNotifyFound (IDispatch* pNotify, IDispatch* pInstr) [signal]
> Connect a slot to this signal:
> QObject::connect(object, SIGNAL(OnNotifyFound(IDispatch*, IDispatch*)), receiver, SLOT(someSlot(IDispatch*, IDispatch*)));
> 
> Is there any way to connect this signal to a Python method using the new style? (This works with win32com, but I'd much rather use PyQt5!)

No - PyQt doesn't know anything about IDispatch.

Phil


More information about the PyQt mailing list