[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] Connecting and sending a message in bluetooth using python and PyQt5
From: David Boddie <david () boddie ! org ! uk>
Date: 2020-04-18 8:52:59
Message-ID: 1908173.j5oxBYigdo () aurora
[Download RAW message or body]
On Sat Apr 18 08:43:13 BST 2020, Jason Friedman wrote:
> Thanks for taking the time to answer.
No problem.
> I found the problem - I was mixing "regular" Bluetooth and QtBluetooth.
>
> In particular, this line:
> self.sock = QtBluetooth.QBluetoothSocket(bluetooth.RFCOMM)
>
> should have been:
> self.sock =
QtBluetooth.QBluetoothSocket(QtBluetooth.QBluetoothServiceInfo.RfcommProtocol)
Ah, I didn't see the constant. Yes, that would cause problems.
> > You are already creating and starting a QApplication instance in your main
>
> code. Does removing this help at all?
>
> Now the program works. And after I removed the duplicate calls to
> QApplication, it stopped crashing on exit also :)
Excellent!
David
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic