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

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


Mike Thompson wrote:
> 
> I'm trying to manipulate ActiveX objects using pyQt, but I've hit the 
> following brick wall:
> 
>    Methods on ActiveX objects can only be called with parameters that
>    can be wrapped by QVariant. Which is a show-stopper of an issue
>    unless there is a work around.
> 

While browsing the API of QAxBase, I've found the solution.

To obtain an ActiveX object wrapped by QVariant, you can't do this:

       o = qt.Variant(activeXObj)

but you can do this:

       o  = activeXObj.asVariant()

--
Mike




More information about the PyQt mailing list