StarShaper
2nd February 2012, 02:28
Hi,
I am using the following line to read from a socket in an enum type.
QDataStream in;
...
in >> enumVar;
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. ;)
I am using the following line to read from a socket in an enum type.
QDataStream in;
...
in >> enumVar;
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. ;)