PyQt5: is the wrapper incomplete?
Vincent Vande Vyvre
vincent.vande.vyvre at telenet.be
Thu Jun 16 03:15:57 EDT 2016
Le 16/06/2016 04:54, jladasky at itu.edu a écrit :
> I am developing a data acquisition system for a custom device that communicates over USB. On the host computer side, I am using PyQt5.4. My Linux box has both Qt4 and Qt5 installed on it. I assume that PyQt5.4 compiled on top of Qt5 automatically. I'm not sure how to check that.
> In any case, I used PySerial to handle the USB communication. I just noticed that Qt also has serial features. I need to give the completed program to other users, on Windows no less. If I can forego PySerial and use Qt's serial interface instead, it would simplify the installation.
> Now, the PyQt5 documentation implies that a module called QtSerial exists. But while I can write...
> from PyQt5.QtWidgets import (...), or
> from PyQt5.QtGui import (...), or
> from PyQt5.QtCore import (...),
> ...attempting to import from PyQt5.QtSerial raises an ImportError.
> I've tried many variations on the spelling, and I've tried various import statements to inspect the (very large and complex) PyQt5 namespace. I haven't found the QtSerial classes. Are they even there? Maybe the wrapping of the library is incomplete?
> Any guidance is appreciated, thanks!
On Debian, this is a separate package python3-pyqt5.qtserialport, I
don't know for other Linux
After install you can use:
from PyQt5.QtSeriaPort import QSerialPort
More information about the Python-list