Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

How to convert string to double ?

$
0
0
I don’t know if you can do that, if you stay in pure javaScript you can only use float precision I guess: parseFloat("12,345,678.976548".replace(",", "")) As far as I know JS floats are always of 64 bit precision, that should be like a c++ double (long double) I guess? for your example that number should very well fit inside of a float, I don’t know if you can use real c++ double or long long within QML, you can declare a double property in QML but there is no way of parsing a string to double I guess, so you might have to use your own c++ function for that.

Viewing all articles
Browse latest Browse all 4972

Latest Images

Trending Articles



Latest Images