Re: dynamicCall and QByteArray - strange characters
Originally Posted by franco.amato
Wysota how can I do to convert from bigendian some bytes of the qbytearray?
For example I would convert from bigendian the bytes from ba[14] to ba[28] ( 15 bytes ).
memcpy( name, &ba[14], sizeof(char)*15); //I copy 15 bytes of ba to name
char* name_converted =newchar[15];
name_converted = qFromBigEndian(name);
char* name = new char[15];
memcpy( name, &ba[14], sizeof(char)*15); //I copy 15 bytes of ba to name
char* name_converted = new char[15];
name_converted = qFromBigEndian(name);
To copy to clipboard, switch view to plain text mode
now I would convert from bigendian the content of name to display the name.
but the qFromBigEndian doesn't return as value a char[] so I can not display correct a name
qFromBigEndian() is a template function and returns type given in template call.
But... Can you name a type which has a 15 bytes?? I don't know such type... they rather have 2^n bytes, so what type do you want to get?
I would like to be a "Guru"
Useful hints (try them before asking):
Use Qt Assistant
Search the forum
If you haven't found solution yet then create new topic with smart question.
Bookmarks