QInputDialog get double with unlimited number of decimal
-
Hi,
I need to let the user input double number without restriction on number of decimals.
If I useQInputDialog::getDouble()
with 100 decimals then the dialog becomes unconvenient when I display started value (it shows me my value and 100 of zeros even if this is a rounded value).The other way is to control every character of
QInputDialog
text. But I can't see there a signal or a virtual function that I could use to control user typing.What would you recommend me?
-
If you really think 100 decimal places is important (I have my doubts) then you need to define your own custom fixed precision type. double isn't going to represent the value to the precision that you want, as it only stores 15-17 significant digits, plus the exponent.
-
@Kent-Dorfman thank you for reply.
Double it is ok I just wrote 100 values for example.
The problem that QInputDialog is going to be used to define value-range of points and this value range maybe very different: from -10000 to 10000, or from -0.0000001 to 0.000002. I'm trying to say that is hard to detefine the order of value range.
So it would be nice to have unlimited (or 15-17) number of decimals that are hidden and not displayed as 123,0000000000000