[PyKDE] Re: PyQt ActiveX support: can't pass some types of parameters

Mike Thompson mike.spam.filter at day8.com.au
Tue Oct 12 09:47:02 BST 2004


Mike Thompson wrote:
> I change script to:
> 
>     import qt
>     import qtaxcontainer
> 
>     streamObj = qtaxcontainer.QAxObject("ADODB.Stream")
>     streamObj.dynamicCall("Open(const 
> QVariant&,ConnectModeEnum,StreamOpenOptionsEnum,const QString&,const 
> QString&)");
>     streamObj.dynamicCall("WriteText(const QString&,StreamWriteEnum)", 
> qt.QVariant("some text"));
>     streamObj.dynamicCall( "SaveToFile(const QString&,SaveOptionsEnum)", 
> qt.QVariant("pyQt.out"))
> 

Changed my use of QAxObject to QAxWidget and now at least I'm getting 
error messages.  First one is:

     QAxBase: Error calling IDispatch member Open: Exception thrown by 
server.

I suspect this is because I'm not suppling a full set of parameters to 
Open(). (I had assumed defaults would be used when parameters are 
omitted, as they are with win32com).  I'll test that theory next.

But, before moving on, ...

Why doesn't QAxObject work?   "ADODB.Stream" has no UI.

And, just as importantly, why does QAxObject fail silently?

--
Mike





More information about the PyQt mailing list