[Bug]Can't send D-Bus struct as variant with PyQt6

JakobDev jakobdev at gmx.de
Thu Aug 3 10:56:03 BST 2023


On PyQt5 it is possible to pass a struct marked as variant as argument to a D-Bus method. However, on PyQt6 this is no longer possible. It throws this error:

QDBusMarshaller: type 'PyQt_PyObject' (65734) is not registered with D-BUS. Use qDBusRegisterMetaType to register it
qt.dbus.integration: QDBusConnection: error: could not send message to service "com.example.App" path "/com/example/App" interface "com.example.App" member "Example": Marshalling failed: Unregistered type PyQt_PyObject passed in arguments

I attached a example code which shows the behaviour in PyQt5 and PyQt6. The error happens before anything is send, so you don't need a specific D-Bus interface to test it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.py
Type: text/x-python
Size: 1067 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20230803/e54db6b0/attachment.py>


More information about the PyQt mailing list