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

List:       pykde
Subject:    Re: [PyQt] =?utf-8?q?How_to_call_DBus_method_with_UInt32_arg=3F?=
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2012-12-13 6:58:24
Message-ID: f511430a406d382ad9870fdb5dc7d115 () localhost
[Download RAW message or body]

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