title: How to use QSerialDevice in Qt?
body: <p>I am trying to use QSerialDevice in Qt to get a connection to my serial port. I also tried QextSerialPort before (which works on Windows Vista but unfortunately not on Windows XP ..) but I need an API which supports XP, Vista and Win7...
  I build the library and configured it this way:  </p>
  
  <pre><code>CONFIG      += dll
  CONFIG      += debug
  </code></pre>
  
  <p>I did use the current version from SVN (0.2.0 - 2010-04-05) and the 0.2.0 zip package.<br>
  After building the library I did copy it to my Qt Libdir (C:\Qt\2009.05\qt\lib) and also to C:\Windows\system32. Now I try to link against the lib in my project file:  </p>
  
  <pre><code>LIBS += -lqserialdevice
  </code></pre>
  
  <p>I import the needed header (abstractserial.h) and use my own AbstractSerial like this:  </p>
  
  <pre><code>// Initialize
  this-&gt;serialPort-&gt;setDeviceName("COM1");
  if (!this-&gt;serialPort-&gt;open(QIODevice::ReadWrite | QIODevice::Unbuffered))
    qWarning() &lt;&lt; "Error" &lt;&lt; this-&gt;serialPort-&gt;errorString();
  
  // Configure SerialPort
  this-&gt;serialPort-&gt;setBaudRate(AbstractSerial::BaudRate4800);
  this-&gt;serialPort-&gt;setDataBits(AbstractSerial::DataBits8);
  this-&gt;serialPort-&gt;setFlowControl(AbstractSerial::FlowControlOff);
  this-&gt;serialPort-&gt;setParity(AbstractSerial::ParityNone);
  this-&gt;serialPort-&gt;setStopBits(AbstractSerial::StopBits1);
  </code></pre>
  
  <p>The problem is, that if I run my application, it crashes immediately with exit code -1073741515 (application failed to initialize properly). This is the same error I got using QextSerialPort under Windows XP (it worked with Windows Vista).<br>
  If I build the QSerialDevice lib with release config and also my program, it crashes immediately but with exit code -1073741819  </p>
  
  <p>Can someone help me with this program or with another solution of getting a serial port to work with Qt (maybe another API or something?) Otherwise I have to use Windows API functions which would mean that my program won't work with UNIX systems..<br>
  If you have a solution for the problem with QextSerialPort under WinXP SP3, they are also welcome ;)  </p>
  
  <p>Best Regards,<br>
  Tobias</p>