QSerialPort readyRead() signal not emited
-
connect(serialScanner->serialPort, SIGNAL(readyRead()), serialScanner, SLOT(handleReadyRead()));Why is it than with the respective serial port opened, my code never gets into the connected function that is handleReadyRead()?
The code below is my alternative implementation within the class constructor, so as everything has the same scope.
if (scanConnectedSerialDevices()){ serialPort = new QSerialPort(); portPath = serialPortName; serialPort->setPortName(portPath); qDebug()<<serialPort->portName(); serialPort->setBaudRate(this->serialPortBaudeRate); connect(serialPort, SIGNAL(readyRead()), this, SLOT(handleReadyRead())); connect(serialPort, SIGNAL(bytesWritten(qint64)), this, SLOT(handleBytesWritten(qint64))); serialPort.openPort(QIODevice::ReadOnly);edit: Changing the Device, thus the Driver due to the scanner being from a different manufacturer my code works just fine??????
-
connect(serialScanner->serialPort, SIGNAL(readyRead()), serialScanner, SLOT(handleReadyRead()));Why is it than with the respective serial port opened, my code never gets into the connected function that is handleReadyRead()?
The code below is my alternative implementation within the class constructor, so as everything has the same scope.
if (scanConnectedSerialDevices()){ serialPort = new QSerialPort(); portPath = serialPortName; serialPort->setPortName(portPath); qDebug()<<serialPort->portName(); serialPort->setBaudRate(this->serialPortBaudeRate); connect(serialPort, SIGNAL(readyRead()), this, SLOT(handleReadyRead())); connect(serialPort, SIGNAL(bytesWritten(qint64)), this, SLOT(handleBytesWritten(qint64))); serialPort.openPort(QIODevice::ReadOnly);edit: Changing the Device, thus the Driver due to the scanner being from a different manufacturer my code works just fine??????
@VrasI said in QSerialPort readyRead() signal not emited:
serialPort.openPort(QIODevice::ReadOnly);
What does it return?
-
@VrasI said in QSerialPort readyRead() signal not emited:
serialPort.openPort(QIODevice::ReadOnly);
What does it return?
-
-