title: qextserialport strange read
body: <p>Im using Window 7 x64
  Problem in that that I send with Arduino on PC information, and when reading port, I receive the strange artifact of Arduino send(0000000) PC reads (0000+000) or something similar (00000+00) - (0+000000) and so on.</p>
  
  <p>For an example I will show a screenshot</p>
  
  <p><img src="https://i.stack.imgur.com/OqY96.jpg" alt="enter image description here"></p>
  
  <p>and</p>
  
  <p><img src="https://i.stack.imgur.com/REwyC.jpg" alt="enter image description here"></p>
  
  <p>Open port</p>
  
  <pre><code>bool MainWindow::openPort()
  {
  
      QString strPort = LineConnect-&gt;currentText();
      port = new QextSerialPort(strPort, QextSerialPort::EventDriven);
  
      if (port-&gt;open(QIODevice::ReadWrite | QIODevice::Unbuffered) == true) {
  
  
          port-&gt;setBaudRate(BAUD9600);
          port-&gt;setDataBits(DATA_8);
          port-&gt;setParity(PAR_NONE);
          port-&gt;setStopBits(STOP_1);
          port-&gt;setFlowControl(FLOW_OFF);
          port-&gt;setTimeout(100);
          port-&gt;waitForReadyRead(10);
          port-&gt;open(QIODevice::ReadWrite | QIODevice::Unbuffered);
          connect(port,SIGNAL(readyRead()), this, SLOT(onReadyRead()));
          INFO_conn-&gt;append("port "+ port-&gt;portName() + " opened..");
          INFO_conn-&gt;append("port " + port-&gt;portName() + " reading..");
  
          return true;
      } else {
          INFO_conn-&gt;append("port " + port-&gt;portName() + " error connection..");
      }
      return false;
  }
  </code></pre>
  
  <p>Read data</p>
  
  <pre><code>void MainWindow::onReadyRead()
  {
          /*first option read data*/
          QByteArray msg = port-&gt;readAll();
          int size = msg.size();
          QString data = "Data: " + msg + " size: " + QString::number(size);
          INFO_conn-&gt;append(data);
  
          /*second option read data*/
      //    char data[1024];
      //    QTextStream out(stdout);
  
      //    out &lt;&lt; "data received: ";
      //    int bytesRead = port-&gt;read(data, 1024);
      //    data[bytesRead] = '\0';
      //    out &lt;&lt; data &lt;&lt; " (" &lt;&lt; bytesRead &lt;&lt; " bytes)" &lt;&lt; endl;
      //    //QString messRead = "data received: " + data +" "+ bytesRead + " bytes";
      //    INFO_conn-&gt;append(data);
  
  }
  </code></pre>
  
  <p>send data arduino for PC</p>
  
  <pre><code>void setup()
  {
     Serial.begin(9600);
  
     .....
  }
  void loop()
  {
     Serial.print(K38);
     Serial.print(K40);
     Serial.print(K42);
     Serial.print(K44);
     Serial.print(K46);
     Serial.print(K48);
     Serial.print(K50);
  
     or
  
     Serial.print("0000000"); // result same
  
  }
  </code></pre>
  
  <p>I can't understand in what there can be a problem, tried everything. 
  Examples from QexSerialPort library read too most. 
  Need help.Thanks for any help.</p>