title: Detect removal of open serial port devices (Qt / Windows)
body: <p>I have a Qt app which communicates with a dongle via serial (it's an FTDI chip). I poll <code>QSerialPortInfo::availablePorts()</code> to detect when ports are added or removed, and then send the dongle a blank line to identify it (my dongle responds to this with its ID, I'm banking on it being harmless to 99% of other devices).</p>
  
  <p>This all works fine, <em>except</em> that if you remove the dongle while the connection is active, it seems like the connection isn't closed and the port is still returned in <code>QSerialPortInfo::availablePorts()</code>.</p>
  
  <p><strong>Does anyone know how to detect the serial dongle's removal while I have a connection to it (other than hacks like pinging it).</strong></p>
  
  <p>I've tried listening for all the signals <code>QSerialPort</code> emits (<code>error()</code>, <code>readChannelFinished()</code>, etc.) but none of them are emitted when you pull the dongle out. This is on Windows 7 by the way.</p>