I work base on windows8.1 with QT5.4 environment and using QSerialPort example (terminal) to connect to my Atmel SAMD21 board USB-Serial port. When 1st time connect this board to my USB port, it doesn't have any response on this terminal workspace. But if I use other terminal tool (like teraterm), it will work properly everytime. Then after connect successful by that way, I switch back to execute my Qt terminal sample, it works as normal.

It is strange for me. Then I add serial=->clear() after serial->open() successfully, it will cause this application hang. My modification as below:
-------------------
void MainWindow:penSerialPort()
{
SettingsDialog::Settings p = settings->settings();
serial->setPortName(p.name);
serial->setBaudRate(p.baudRate);
serial->setDataBits(p.dataBits);
serial->setParity(p.parity);
serial->setStopBits(p.stopBits);
serial->setFlowControl(p.flowControl);
if (serial->open(QIODevice::ReadWrite)) {
console->setEnabled(true);
console->setLocalEchoEnabled(p.localEchoEnabled);
ui->actionConnect->setEnabled(false);
ui->actionDisconnect->setEnabled(true);
ui->actionConfigure->setEnabled(false);
ui->statusBar->showMessage(tr("Connected to %1 : %2, %3, %4, %5, %6")
.arg(p.name).arg(p.stringBaudRate).arg(p.stringDat aBits)
.arg(p.stringParity).arg(p.stringStopBits).arg(p.s tringFlowControl));
serial->clear(); // << The only line I add
} else {
QMessageBox::critical(this, tr("Error"), serial->errorString());

ui->statusBar->showMessage(tr("Open error"));
}
}
----------------------

Does anybody have same issue before as mine? Please help.