Behavior of pyqtProperties in a QDBusAbstractAdapter

Mark Locascio malocascio at hotmail.com
Fri Aug 6 21:01:50 BST 2021


Hi all,

I'm seeing some odd behavior from a QDBusAbstractAdapter, and I think it's because I don't fully understand all the ins and outs of DBus types. Here's an example I put together on github: https://github.com/maldata/qt-dbus-bluez/blob/main/qt-example.py

If you look at the documentation for the Bluez advertising API (https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/advertising-api.txt?h=5.60#n16), you'll see that there are several properties like Type, ServiceUUIDs, ManufacturerData, Appearance, and so on. In my code around line 47 (https://github.com/maldata/qt-dbus-bluez/blob/1b9d00a30a393b25dc35d0267b85599af390aaae/qt-example.py#L47), I implement that interface in a class that extends QDBusAbstractAdaptor, and I add a pyqtProperty for each of the Bluez properties. When I look at the object in D-feet, some properties are properly listed. Others, however, are not listed (nor are they listed in the BLE advertisement). The ones that ARE present are Type, ServiceUUIDs, Includes, and LocalName. Values like Appearance (a uint16), ManufacturerData (a dict with uint8 keys), and ServiceData (a dict with string keys) are not. I assume because I'm doing something with the more complicated types that it doesn't like, but I'm not certain.

Can anyone help clear this up?

Thanks!
-Mark

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210806/439409b7/attachment.htm>


More information about the PyQt mailing list