So I'm down to my last little bug in a keypad I built; getting the precision to not be...exorbitant. I've checked through the docs and haven't found any methods that detect the number of significant digits. I'm getting ready to write a substantial bit of code (at least by compared to the task at hand) and adding potentially needless state to an object to deal with keeping track. I can do this, but I'm just curious beforehand if there's any sort of detect precision functionality in Qt.
Note: I know it will figure it out itself when it converts to scientific notation (or at least it'll figure it out good enough.) My algorithm to deal with it basically entails chopping off the E(blah) part, dealing with the current decimal if needed (moving or deleting it) and appending (or prepending) zeros to my QString so it reads the way I want it to (I.E. so it reads just like the 'f' argument would, but with a precision dependent on the input.) This may not work; as I'm assuming Qt doesn't use scientific notation with some set number of decimals, but uses it like actual scientific notation.
Thanks!
Bookmarks