[PyQt] QBluetooth support for a PyQT Bluetooth Server

Phil Thompson phil at riverbankcomputing.com
Wed May 29 09:23:53 BST 2019


On 28/05/2019 22:31, José Jácome wrote:
> Hi to all,
> 
> I've read the official tutorial of QBluetooth C++ on
> https://doc.qt.io/qt-5/qtbluetooth-btchat-example.html, I tested it on 
> my
> PC and it works very. I would like to adapt that code to PyQT to test a
> Bluetooth Server, after digging in the PyQT Docs I have figure out that
> class *QBluetoothServiceInfo::Sequence* doesn't exist. This class is
> defined for configure the PublicBrowseGroup and protocolDescriptorList
> parameters.
> 
> While there isn't enough info about BT Server on PyQT, I've tried to 
> adapt
> the code in my way but I haven't got success to connect my Phone to my 
> PC
> like the C++ code does while I haven't had a Python or 
> qt.bluetooth.bluez
> error. If I can find my error, I will implement this code inside a 
> Thread
> on a GUI.
> 
> I wonder if PyQT has full support for QBluetooth or Am I doing 
> something
> wrong?

The Sequence and Alternative classes aren't needed in Python. Just use 
lists of values instead.

Phil


More information about the PyQt mailing list