Wich class replace QextSerial enumerator ? SOLVED
Installation and Deployment
10
Posts
2
Posters
2.6k
Views
1
Watching
-
Hi Hall,
It seems that with QT51 and QserialPort the class QextSerialEnumerator is not available as it was in older version. (i have installed qserialPort, the examples works perfectly but i can't find qextserialenumerator.h on my hard disk, so my project does not compile.
What is now the mean to find the available COM ?
Thanks
Montin
-
Hi MONTIN.
QextSerialEnumerator not belongs to QSerialPort. Take a look to a "Wiki":http://qt-project.org/wiki/QtSerialPort .
For finding available ports you can use:
@foreach (const QSerialPortInfo &info, QSerialPortInfo::availablePorts()) {
qDebug() << "Name : " << info.portName();
qDebug() << "Description : " << info.description();
qDebug() << "Manufacturer: " << info.manufacturer();// Example use QSerialPort QSerialPort serial; serial.setPort(info); if (serial.open(QIODevice::ReadWrite)) serial.close(); }@
-