Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to convert Qstring to floating point which has more than 6 digits after comma
kybernetes last edited by kybernetes
I am tring to convert a string to float but i loose digits after comma
string = "0,123456789"
when i use
qDebug() << string.tofloat()
İt is written like this (it rounds after 6th digit)
How can i solve it i want to use all the 9 digits after comma
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.
kybernetes last edited by