[PyQt] How to expose function accepting array of struct to D-Bus?
Evade Flow
evadeflow at gmail.com
Thu Aug 9 17:06:57 BST 2012
While attempting to put together a test case for this array-of-struct
difficulty I'm having, I discovered that I can't even talk to most of
these (C++/Qt) services using the standard dbus-python module. For any
method that takes an array-of-struct, I always get 'No such method'
errors.
Since this isn't PyQt-specific, I posted a question to stackoverflow.com
(see http://is.gd/dyhcNh). However, I figured some folks on this list
might be interested, or might know why a Qt-based D-Bus service that
exports methods with array-of-struct in their signature are (seemingly)
so darn difficult to invoke from Python! `:-}
On Tue, Aug 7, 2012 at 4:25 PM, Phil Thompson
<phil at riverbankcomputing.com> wrote:
> On Tue, 7 Aug 2012 15:45:43 -0400, Evade Flow <evadeflow at gmail.com> wrote:
>>> In theory you should be able to use QDBusArgument but I've not tested
>>> it - I've always struggled to find test cases.
>
>> @pyqtSlot(QDBusArgument)
>> def setPosition(self, pos):
>> print("How can I call this function?")
>
> If you change this to...
>
> @pyqtSlot(float, float, float)
> def setPosition(self, pos0, pos1, pos2):
> print("How can I call this function?", pos0, pos1, pos2)
>
> ...then it works. So is the test case still valid?
>
> Phil
More information about the PyQt
mailing list