[Qt-interest] QLocale::toString(double) implicitly rounds?!?
Schimkowitsch Robert
Robert.Schimkowitsch at andritz.com
Tue Aug 16 13:11:25 CEST 2011
Hi,
is it correct that converting a double to a QString using
QLocale::toString will round the number before conversion, if the given
precision is insufficient to fit the number?
This is neither documented (see
http://doc.qt.nokia.com/4.7/qlocale.html#toString-9,
http://doc.qt.nokia.com/4.7/qstring.html#number-2 and
http://doc.qt.nokia.com/4.7/qstring.html#argument-formats), nor desired
in all use cases.
How can I force toString to cut off, instead of round?
Kind regards
Robert Schimkowitsch
#####################################################################################
This message and any attachments are solely for the use of the intended recipients. They may contain privileged and/or confidential information or other information protected from disclosure. If you are not an intended recipient, you are hereby notified that you received this email in error and that any review, dissemination, distribution or copying of this email and any attachment is strictly prohibited. If you have received this email in error, please contact the sender and delete the message and any attachment from your system.
Thank You.
#####################################################################################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110816/9117f7d9/attachment.html
More information about the Qt-interest-old
mailing list