[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] QAxBase.dynamicCall - calling convention
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2013-03-29 18:12:58
Message-ID: 9ec5b7d704f9375d4d80ba3d70504551 () localhost
[Download RAW message or body]

On Thu, 28 Mar 2013 10:57:16 +0100, Frank Hempel <red_socks@gmx.de> wrote:
> Am 05.02.2013 17:02, schrieb Phil Thompson:
>>> I'm wondering how to call a function of an activex control with more
>>> the 8
>>> parameters. Regarding the Qt doc the QAxBase->dynamicCall() can be
>>> called
>>> in two ways, with at max 8 separate parameters or with a list of
>>> variable
>>> length.
>>>
>>> Using dynamicCall from python only seems to work when specifying all
>>> parameters separately, only usefull for less or equal 8 parameters.
Can
>>> someone confirm that using the "parameters-as-list calling convention"
>>> is
>>> not wrapped into python? Or is there some special indication needed to
>>> have it that way?
>>>
>>> Thanks for any hints...
>> 
>> The list version was broken but should be Ok in the current snapshot.
>> 
> 
> The pyqt-version released in the beginning of march did not bring any
> enhancement. I tried py2.6-qt4.8.4-x32 and py3.3-qt5.0.1-x32.
> 
> 
> The lines of code in question:
> 
> params = [QVariant(x) for x in ("http://qt-project.org", 0, "", "", "")]
> 
> # works (axc is a browser-activeX in the example)
> axc.dynamicCall("Navigate(QString, QVariant&, QVariant&, QVariant&, \
>                 QVariant&)", *params)
> 
> # does not work (means the python statement executes without error but
> # the activeX complains about bad arguments)
> axc.dynamicCall("Navigate(QString, QVariant&, QVariant&, QVariant&, \
>                  QVariant&)", params)

I need a short, complete script that demonstrates the problem.

Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic