Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hello there,
I got the follow code :
@property real compassValue : 3.1415927895412 Text { text: "<b>" + compassValue + "°</b>" }@
The fact is that I only want to display "3.14". Is there a way to troncate the value ?
Thx for any help !
QML can use JavaScript Math object. I found in Google this method:
@ property real compassValue : 3.1415927895412 Text { text: "<b>" + Math.round(compassValue*100)/100 + "°</b>" } @
"Source":http://www.mredkj.com/javascript/nfbasic2.html
very nice, thanks :)