Is there a quick way to convert a float value to a byte wise (hex) representation in a QByteArray?
QByteArray
Have done similar with memcpy() before u
memcpy()
I'm not sure what you want exactly.
To stuff the binary representation into a QByteArray you can use this:
float f = 0.0f; QByteArray ba(reinterpret_cast(&f), sizeof (f));
To get a hex representation of the float you can add this:
QByteArray baHex = ba.toHex();