[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] QDoubleSpinBox & it's precision
From:       Baz Walter <bazwal () ftml ! net>
Date:       2009-10-10 11:46:49
Message-ID: 4AD07429.7060904 () ftml ! net
[Download RAW message or body]

Prashant Saxena wrote:
> I am initializing spinBox with value (0.421), what I am getting is (0.42).
> Third decimal precision is getting disappeared. I need exact value in spin box.

the value of QDoubleSpinBox.decimals() defaults to 2.

you need to call setDecimals(3) *before* you call setValue(0.421).

HTH

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic