C++ (Qt)byteArray.append( reinterpret_cast< const char * >( &data ), size );
C++ (Qt)QDataStream& operator << ( QDataStream& out, const YourData& data );QDataStream& operator >> ( QDataStream& in, YourData& data );
C++ (Qt)QByteArray QByteArray::fromRawData ( const char * data, int size )QByteArray & QByteArray::setRawData ( const char * data, uint size )
byteArray.append( reinterpret_cast< const char * >( &data ), size );
C++ (Qt)while(!asleep()) sheep++;
C++ (Qt)byteArray.append( (char *) &data, size );