Changes between Version 1 and Version 2 of Ticket #5050, comment 10
- Timestamp:
- 2019-01-31T22:22:28Z (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #5050, comment 10
v1 v2 3 3 It is not very much needed, but would be a nice feature to have. In other words would enhance the ''quality'' of OMEdit. 4 4 5 I n addition to the proposal by Francesco, a simple option is to use5 If you want to implement smart truncation, i.e. correct number display whether their are in exponential form or not, in addition to the proposal by Francesco, a simple option is to use 6 6 QString::setNum(double n, char format = 'g', int precision = 6) 7 7 with 'g' format and variable precision. 8 This should be safer, since would work with systems having any number of digits, and whether they use or not a digit for positive signs, as exponent. 8 9 This should be safer: Francesco's solution takes for granted that the number of characters for exponent in number strings is always the same, which might not be the case for all OS's, depending on how you create those strings.