PAL12789. Use 'g' conversion specifier for showing numbers

This commit is contained in:
eap 2006-07-03 14:16:43 +00:00
parent fc5e4e00fc
commit b9a6196fd8

View File

@ -96,6 +96,8 @@ QString DlgRef_SpinBox::GetString()
void DlgRef_SpinBox::RangeStepAndValidator(double min, double max,double step,
unsigned short decimals)
{
setPrecision(-decimals); // PAL12789. Minus is for using 'g' double->string conversion specifier,
// see QtxDblSpinBox::mapValueToText( double v )
setRange(min, max);
setLineStep(step);
((QDoubleValidator*)validator())->setRange(min, max, decimals);