[PyQt] QtDBus: Calling a method with an Array of Strings signature with Python 3
Chris Mayo
cjmayo at users.sourceforge.net
Mon Dec 5 19:12:33 GMT 2011
>
> Try this...
>
> arg = QDBusArgument()
> arg.beginArray(QMetaType.QString)
> arg.add("")
> arg.endArray()
>
> ....and pass arg to call().
Doesn't seem to work:
device_iface = QtDBus.QDBusInterface('org.freedesktop.UDisks',
'/org/freedesktop/UDisks/devices/sr0', 'org.freedesktop.UDisks.Device',
bus)
arg = QtDBus.QDBusArgument()
arg.beginArray(QMetaType.QString)
arg.add("")
arg.endArray()
reply = device_iface.call("DriveEject", arg)
print(reply.errorMessage())
Returns:
Unknown option
PyQt-x11-gpl-snapshot-4.9-512e7813ed74
Chris
More information about the PyQt
mailing list