I remove the openSerialPort() call from the constructor.
MySerialPort::MySerialPort()
{
serial = new QSerialPort(this);
connect(serial, SIGNAL(readyRead()), this, SLOT(readData()));
connect(serial, SIGNAL(error(QSerialPort::SerialPortError)), this,
SLOT(handleError(QSerialPort::SerialPortError)));
//openSerialPort();
}




Reply With Quote




Bookmarks