QByteArray arrBlock;
QDataStream binaryStream(&arrBlock, QIODevice::WriteOnly);
binaryStream << QPixmap();
#pragma pack(push, 1)
struct MyStruct
{
qint64 varA;
qint64 varB;
};
#pragma pack(pop)
MyStruct myStruct;
myStruct.varA = 234;
myStruct.varB = 4534;
QByteArray structByteArray(reinterpret_cast<const char*>(&myStruct), sizeof(MyStruct));