How to convert Qstring to floating point which has more than 6 digits after comma
Solved
General and Desktop
-
hello,
I am tring to convert a string to float but i loose digits after comma
For example
string = "0,123456789"
when i use
qDebug() << string.tofloat()
İt is written like this (it rounds after 6th digit)
0,123457
How can i solve it i want to use all the 9 digits after comma
-
Hi,
You can change the precision of qDebug using qSetRealNumberPrecision. The default is six hence your result but your float value should be fine to use.
-
Thank you.