I am new to QScript (and C derivitive languages ), although I have a backbround in programming. I have been given the job of modifying an existing script. I have got pretty much everything I want working except one item.
Qt Code:
  1. page. drawText ( ps. x + xs( ps. w, 40 ), y, xs( ps. w, 80 ) , h, CReportPage.AlignHCenter | CReportPage.AlignVCenter, Document. statistics. weight );
To copy to clipboard, switch view to plain text mode 
This is correct - except I want to format the text string generated.
The weight is in grams from 0 to 100,000 grams. It is a real number. In the test data I have a weight displayed of -2.190000057220459.
I do not unerstand why the -ve sign is present. I want to only display 3 digits to the right of the decimal, any help would be greatly appreciated.

Thanks

Allan