QT5 Problems Opening SerialPort
<p>I am trying to open a SerialPort with QT5.5, but the port is always not able to be opened. I am not that familiar with ports and serial, but I can't find any problems with the way I initiated everything. I am using Mac OSX</p>

<pre><code>void MainWindow::init_port()
{
    port = new QSerialPort("com4");     //create port

    port-&gt;open(QIODevice::ReadWrite); //open port
    if(!port-&gt;isOpen())
    {
        QMessageBox::warning(this, "port error", "Can't open port!");
    }
//    if(serial.open(QIODevice::ReadWrite))
//        serial.write("ok*");
    else
    {
        //error
        qDebug() &lt;&lt; port-&gt;errorString();
    }

    //set port properties
    port-&gt;setBaudRate(QSerialPort::Baud9600); //9600 FOR ARDUINO
    port-&gt;setFlowControl(QSerialPort::NoFlowControl);
    port-&gt;setParity(QSerialPort::NoParity);
    port-&gt;setDataBits(QSerialPort::Data8);
    port-&gt;setStopBits(QSerialPort::OneStop);
}
</code></pre>

<p>My overall goal is to be communicating with an Arduino microcontroller with a GUI.</p>