Hi,

I am using the following line to read from a socket in an enum type.

Qt Code:
  1.  
  2. ...
  3.  
  4. in >> enumVar;
To copy to clipboard, switch view to plain text mode 

It seems that Qt only reads 2 bytes from the socket stream, which is not what I expected. I thought C++ enums are 4 byte (32-bit) long?

Is there any definition, how QDataStream works with enum?

Solved: My fault! Just missed the overloaded << operator.