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

List:       pykde
Subject:    Re: [PyQt] How to call DBus method with UInt32 arg?
From:       Evade Flow <evadeflow () gmail ! com>
Date:       2012-12-13 19:28:55
Message-ID: CAMAb8ZPn44gqqEJ9L74G+aAdq32chsXvnwAvhCi3VGACq97xHw () mail ! gmail ! com
[Download RAW message or body]

> 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@riverbankcomputing.com> wrote:
> On Thu, 13 Dec 2012 06:47:50 +0000, Phil Thompson
> <phil@riverbankcomputing.com> wrote:
>> On Mon, 10 Dec 2012 13:41:36 -0500, Evade Flow <evadeflow@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
_______________________________________________
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