[PyQt] How to call DBus method with UInt32 arg?
Evade Flow
evadeflow at gmail.com
Thu Dec 13 19:28:55 GMT 2012
> v = QVariant(10)
> v.convert(QVariant.UInt)
Yeah, this definitely does work for me, Phil, thanks...
On Thu, Dec 13, 2012 at 1:58 AM, Phil Thompson
<phil at riverbankcomputing.com> wrote:
> On Thu, 13 Dec 2012 06:47:50 +0000, Phil Thompson
> <phil at riverbankcomputing.com> wrote:
>> On Mon, 10 Dec 2012 13:41:36 -0500, Evade Flow <evadeflow at gmail.com>
>> wrote:
>>> Hi, all. Does anyone have experience trying to pass UInt32 arguments to
>>> a DBus service using PyQt4.QtDBus? The program appended below
> generates
>>> the following error:
>>>
>>> % python build_connection.py 0 0 0 1234
>>> Call failed: No such method 'buildConnection' in interface
>>> 'com.acme.Audio.Connection' at object path
>>> '/com/acme/Audio/Connection' (signature '(i)(i)(i)i')
>>>
>>> I think it's failing because the actual signature of the method to be
>>> called is '(i)(i)(i)u' [??] (Don't ask why the designers of this
>>> interface wrapped a DBus struct around every int--I have no idea. `:-@)
>>>
>>> Can anyone confirm whether passing unsigned 32-bit arguments is
> possible
>>> with my version of PyQt4/SIP:
>>
>> Unfortunately not. If this is the real cause of the problem then I need
> to
>> provide a way to do this...
>
> Does this fix the problem...
>
> v = QVariant(10)
> v.convert(QVariant.UInt)
>
> This should be Ok for QVariant API 1, but not for API 2.
>
> Phil
More information about the PyQt
mailing list