produces this output:
Obviously, QString::number produces a different string than using a text stream or sprintf. This is inconsistent.
Note, that the behavior of QString::number seems to have been changed/fixed somewhere between version 5.3 and 5.9.1, since when using version 5.3, QString::number produces a leading zero in the exponent as well.
I don't know which is the "correct" way of printing a number. However, I personally would prefer to have as few digits as possible, thus I would choose the first one (produced by QString::number).
|For Gerrit Dashboard: QTBUG-63620|
|231957,5||Make QString's formatting of doubles be consistent with other places||5.11||qt/qtbase||Status: MERGED||+2||0|