Re: [SailfishDevel] string to double in QML?

2016-05-21 Thread Peter Kovacs
Hello, # gives: QString not declared even if there is #include in main.cpp that is not sufficient! Quoted from: http://stackoverflow.com/questions/9500280/access-c-function-from-qml For any C++ code to be called from QML, it must reside inside a QObject. So best is to write your own class that

Re: [SailfishDevel] string to double in QML?

2016-05-21 Thread Caliste Damien
Hello, Le samedi 21 mai 2016, mariusz sapinski a écrit : >I'm trying to convert text from a text field: > to double (property double ekpu) You may want to use parseFloat(). http://www.w3schools.com/jsref/jsref_parseFloat.asp Damien. ___ SailfishOS.