Hi,
I'm trying to copy this structure to a QByteArray:
typedef struct
{
quint32 status_change_id;
bool result_code; // true if sucessful, false otherwise
quint8 reserved[3]; /* Set to 0 */
} driver_id_receipt_data_type;
typedef struct
{
quint32 status_change_id;
bool result_code; // true if sucessful, false otherwise
quint8 reserved[3]; /* Set to 0 */
} driver_id_receipt_data_type;
To copy to clipboard, switch view to plain text mode
The structure already being declared and filled with:
driver_id_receipt_data_type receipt;
receipt.status_change_id = payload.mid(2,4).toUInt();
receipt.result_code = true;
receipt.reserved[0] = 0;
receipt.reserved[1] = 0;
receipt.reserved[2] = 0;
driver_id_receipt_data_type receipt;
receipt.status_change_id = payload.mid(2,4).toUInt();
receipt.result_code = true;
receipt.reserved[0] = 0;
receipt.reserved[1] = 0;
receipt.reserved[2] = 0;
To copy to clipboard, switch view to plain text mode
Every approach I use (cast to (char *), ::fromRawData(), etc) I stumble upon the impossibility of reaching the desired goal... 
Is there a way of doing this?
Any help appreciated 
Best regards,
Pedro Doria Meunier
Bookmarks