Changes between Version 1 and Version 2 of Ticket #5050, comment 10


Ignore:
Timestamp:
2019-01-31T22:22:28Z (6 years ago)
Author:
massimo ceraolo

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5050, comment 10

    v1 v2  
    33It is not very much needed, but would be a nice feature to have. In other words would enhance the ''quality'' of OMEdit.
    44
    5 In addition to the proposal by Francesco, a simple option is to use
     5If 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
    66       QString::setNum(double n, char format = 'g', int precision = 6)
    77with '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
     9This 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.