title: QtSerialPort communication issue
body: <pre><code>QSerialPort *serial;
  MainWindow::MainWindow(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::MainWindow)
  {
      ui-&gt;setupUi(this);
      serial = new QSerialPort(this);
      serial-&gt;setPortName("/dev/ttyUSB0");
      serial-&gt;setBaudRate(QSerialPort::Baud9600);
      serial-&gt;setStopBits(QSerialPort::OneStop);
      serial-&gt;setParity(QSerialPort::NoParity);
      serial-&gt;setDataBits(QSerialPort::Data8);
      serial-&gt;setFlowControl(QSerialPort::NoFlowControl);
      serial-&gt;open(QIODevice::ReadWrite);
      connect(ui-&gt;pushButton, SIGNAL(clicked()), this, SLOT(serialReceived())); 
      connect(ui-&gt;pushButton_2, SIGNAL(clicked()), this, SLOT(serialSent()));
  }
  
  MainWindow::~MainWindow()
  {
      delete ui;
      serial-&gt;close();
  }
  void MainWindow::serialReceived()
  {
      ui-&gt;label-&gt;setText(serial-&gt;readAll());
  }
  void MainWindow::serialSent()
  {
      QByteArray bytes;
      serial-&gt;write(bytes);
  }
  </code></pre>
  
  <p>From this code I 've run in qt on Ubuntu. It show QIOdevice::write device not open. But I already plug my usb to serial on this port how can I solve this problem.</p>