[PyQt] QAxBase.dynamicCall - calling convention
Frank Hempel
red_socks at gmx.de
Thu Mar 28 09:57:16 GMT 2013
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)
Thanks, Regards,
Frank
More information about the PyQt
mailing list