Strange error with QtBluetooth.QLowEnergyService

"[email protected]" <[email protected]>
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <[email protected]>
   Hello list,

I am working on a BLE app on PyQt5 and am getting an error I don't understand.

With the following snippet:

    from PyQt5 import QtBluetooth as QtBt

    QtBt.QLowEnergyService.writeCharacteristic(QtBt.QLowEnergyCharacteristic.Unknown, 'asdf')

I get the following error:

   TypeError: writeCharacteristic(self, QLowEnergyCharacteristic, Union[QByteArray, bytes, bytearray], ...
       ... mode: QLowEnergyService.WriteMode = QLowEnergyService.WriteWithResponse): first argument of unbound method must have type 'QLowEnergyService'

But from what I see, the type is correct.
What am doing wrong here?

   Thanks in advance,
      Sietse
_______________________________________________
PyQt mailing list    [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.