PDA

View Full Version : Casting Byte to QChar or QString



Habie
11th December 2015, 14:23
Send and Receive Data using a USB-CAN-Adapter. I can talk to him using a dll which is loaded via the QLibrary object....
there is a typedef, that must be as followed(used as paramter for an function out of a dll)

typedef struct
{
DWORD ID;
canMSGTYPE MSGTYPE;
BYTE LEN;
BYTE DATA[8];
} CANMsg;
myMsg.DATA ist a BYTE but i need to convert it to a char or QString.... in each order i have to hadle it in the GUI.
I have the problem got a couple of days, and have no suitable solution up to now...

ChrisW67
16th December 2015, 20:27
What have you tried in the last couple of days?