I included include(src/qextserialport.pri) in my pro file and added src directry to my project

I created one Dialog(Member to main class) to configure serial port and I popup from main Window an I used the following code in OK button

Qt Code:
  1. void SerianConnectionDialog::on_btnOK_clicked()
  2. {
  3. if (!port->isOpen()) {
  4. port->setPortName(ui->portBox_2->currentText());
  5. port->open(QIODevice::ReadWrite);
  6. }
  7.  
  8. //If using polling mode, we need a QTimer
  9. if (port->isOpen() && port->queryMode() == QextSerialPort::Polling)
  10. timer->start();
  11. this->accept();
  12. }
To copy to clipboard, switch view to plain text mode 


In My main class I concted the ready read of function


Qt Code:
  1. void MainWindow::connectSerialPort()
  2. {
  3.  
  4. if(QDialog::Accepted== dlg.exec())
  5. {
  6.  
  7.  
  8. this->port= dlg.port;
  9. ui->led->turnOn(port->isOpen());
  10.  
  11. timer->setInterval(40);
  12.  
  13. connect(timer, SIGNAL(timeout()), SLOT(onReadyRead()));
  14. connect(port, SIGNAL(readyRead()), SLOT(onReadyRead()));
  15. }
  16. }
To copy to clipboard, switch view to plain text mode 

And I coded to display data in a texedit

Qt Code:
  1. void MainWindow::onReadyRead()
  2. {
  3. if (port->bytesAvailable()) {
  4. ui->textEdit->moveCursor(QTextCursor::End);
  5. ui->textEdit->insertPlainText(QString::fromLatin1(port->readAll()));
  6. ui->textEdit->insertPlainText(QString::fromLatin1("\n"));
  7. }
  8. }
To copy to clipboard, switch view to plain text mode 


But not showing any data from device. Any error in my code ?

The port showing open in Main class but not getting data to textbox
when I run CoolTerm application it showing the data correctly