PDA

View Full Version : QserialPort



arturs
13th May 2015, 20:37
Hi

I use the following code for finding available ports and checking if the ports are busy or not. Actually I would like to use only port which is not used by any aplication.



foreach (const QSerialPortInfo &serial,QSerialPortInfo::availablePorts()){

qDebug() << "Name :" << serial.portName();
if (serial.isBusy())
qDebug () << "OK";
else qDebug () << "NOT OK";
}




but It takes 35 sec Should it take so much time ?

Is it proper working ?

Regards
Artur