Unable to connect an QAxObject signal because of IDispatch type

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to connect an QAxObject signal because of IDispatch type

Neville Mehta
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!)

Thanks,
Neville


_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: Unable to connect an QAxObject signal because of IDispatch type

Phil Thompson-5
On 10 Mar 2018, at 8:05 am, Neville Mehta <[hidden email]> 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
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt