16,212
社区成员
发帖
与我相关
我的任务
分享
if (m_pPort->open(QIODevice::ReadWrite) == true) {
if (!(m_pPort->lineStatus() & LS_DSR))
qDebug() << "warning: device is not turned on";
qDebug() << "listening for data on" << m_pPort->portName();
return true;
}
else {
qDebug() << "device failed to open:" << m_pPort->errorString();
return false;
}