PDA

View Full Version : problem with spinbox control ?



vinod
19th April 2006, 10:43
How to add float values as the step size in spinbox ....


I want to increment the step value at a rate of 0.1,0.2, ......

vratojr
19th April 2006, 12:09
Hi,from Qt documentation:

QSpinBox is designed to handle integers and discrete sets of values (e.g., month names); use QDoubleSpinBox for floating point values.

wysota
19th April 2006, 18:27
With Qt3 you can use wwFloatSpinBox from wwWidgets (http://www.wysota.eu.org/wwwidgets).

Brandybuck
19th April 2006, 19:58
For Qt4, there is already a QDoubleSpinBox that works nicely.

For Qt3, the above class works. I also created a FixedSpinBox class for my QBrew program (on my website). I also seem to recall one on the free download page at Trolltech.