//大端格式,高字节在前QDataStream out(&outData,QIODevice::ReadWrite);out.setByteOrder(QDataStream::BigEndian); //小端格式,低字节在前QDataStream out(&outData,QIODevice::ReadWrite);out.setByteOrder(QDataStream::LittleEndian);