I have built qtserialport for Qt4 and written a console application to log data from a device which sends information at 9600 bauds, 8 data bits, 1 stop bits and no parity, which I think is the default for serial communication. I have managed to open the port correctly and log the data as expected, but whenever I close the application or turn off the computer and try to restart the application it, the port opens but gives me a "framingError". If I close the application and then open the port using hyperterminal, the port opens correctly and then I am able to open my console application without errors. I have read that the framing error can be solved using parity, but I don't really know what settings to use or even that it is the solution to my problem.

```
    //constructor
    MyApp::MyApp()
    {
         QSerialPort *serialPort = new QSerialPort(this);

            connect(serialPort,
                    SIGNAL(error(QSerialPort::SerialPortError)),
                    this,SLOT(serialError(QSerialPort::SerialPortError)));

            serialPort->setPortName("COM1");
            serialPort->setBaudRate(9600,QSerialPort::Input);
            serialPort->setStopBits(QSerialPort::OneStop);
            serialPort->setParity(QSerialPort::NoParity);
            serialPort->setDataBits(QSerialPort::Data8);
            serialPort->setFlowControl(QSerialPort::NoFlowControl);

            if(serialPort->open(QIODevice::ReadOnly))
            {
                qDebug() << "Serial port opened at serialPort->portName();
            }
    }

    ...

    void myApp::serialError(QSerialPort::SerialPortError error)
    {
        if(error != QSerialPort::NoError)
        {
            QMetaEnum metaEnum =  QSerialPort::staticMetaObject.enumerator(
            QSerialPort::staticMetaObject.indexOfEnumerator("SerialPortError"));

            QString errStr(metaEnum.valueToKey(error));

            qDebug() << errStr;
        }
    }

```