PDA

View Full Version : qFromLittleEndian returning "double"



gyre
29th December 2007, 13:41
Hi!
What should I do to make qFromLittleEndian return "double" ?
I know in that in docs there is written that it can return only int...
Is there any way to get data from memory that are double ?
THanks

marcel
29th December 2007, 13:54
Try to convert the uchar array to a QByteArray and then use QByteArray::toDouble to get a double.

gyre
29th December 2007, 20:48
Try to convert the uchar array to a QByteArray and then use QByteArray::toDouble to get a double.

But what about the endianess problem ?

marcel
29th December 2007, 21:05
But what about the endianess problem ?
That you will have to implement yourself.

gyre
30th December 2007, 01:10
That you will have to implement yourself.
So if I understood it correctly...I will have to handle the endianess myself and then newly ordered uchar to QByteArray and that convert to Double ? Its not very handy...
Why shouldnt I just used qFromLittleEndian function ? Its no use ?