I guess you should create a subclass of QIODevice and implement all the platform-specific issues by yourself Something like this:
Qt Code:
  1. //ParalellPort.h
  2. #include <QIODevice>
  3.  
  4. class ParalellPort : public QIODevice {
  5. Q_OBJECT
  6. public:
  7. ParalellPort(const QString &, QObject * = 0);
  8. virtual ~ParalellPort();
  9.  
  10. virtual bool isSequential () const { return true; }
  11.  
  12. virtual bool open(OpenMode);
  13. virtual void close ();
  14. //..
  15. protected:
  16. virtual qint64 readData ( char * data, qint64 maxSize );
  17. virtual qint64 writeData ( const char * data, qint64 maxSize );
  18. private:
  19. #ifdef Q_OS_UNIX
  20. QFile deviceFile;
  21. #endif
  22. };
  23.  
  24. //ParalellPort.cpp
  25. #include "ParalellPort.cpp"
  26.  
  27. ParalellPort::ParalellPort(const QString & port, QObject * parent) :
  28. QIODevice(parent)
  29. #ifdef Q_OS_UNIX
  30. , deviceFile(port)
  31. #endif
  32. {
  33. }
  34.  
  35. bool ParalellPort::open(OpenMode mode) {
  36. #ifdef Q_OS_UNIX
  37. return deviceFile.open(mode);
  38. #endif
  39.  
  40. #ifdef Q_OS_MACX
  41. //...
  42. #endif
  43.  
  44. #ifdef Q_OS_WIN32
  45. //...
  46. #endif
  47. }
  48. //...
To copy to clipboard, switch view to plain text mode 
A quote from TT's docs:
Subclasses of QIODevice are only required to implement the protected readData() and writeData() functions.