Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Qt C++ signed unsigned mismatch

This thread is locked; no one can reply to it. rss feed Print
Qt C++ signed unsigned mismatch
Ariesnl
Member #2,902
November 2002
avatar

Well here's a nasty one (I think) Sending bytes over a line is usually an UNSIGNED matter. I have a device that sends unsigned bytes ( a byte should be unsigned ) over a line using a custom protocol, this cannot be changed !

And I wanted to use Qt to make a nice tool to read it all out. However...
some moron decided that a byte in Qt is SIGNED (QByteArray) and there is no way to make QSerialPort to receive in an unsigned container, nor can QByteArray be set to unsigned

Any suggestions ?

Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard)
Current project: [Star Trek Project ] Join if you want ;-)

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Go to: