*/
QtxDoubleSpinBox::QtxDoubleSpinBox( QWidget* parent )
: QDoubleSpinBox( parent ),
- myCleared( false ),
- myPrecision(0)
+ myCleared( false )
{
+ // Use precision equal to default Qt decimals
+ myPrecision = decimals();
+
connect( lineEdit(), SIGNAL( textChanged( const QString& ) ),
this, SLOT( onTextChanged( const QString& ) ) );
}
*/
QtxDoubleSpinBox::QtxDoubleSpinBox( double min, double max, double step, QWidget* parent )
: QDoubleSpinBox( parent ),
- myCleared( false ),
- myPrecision( 0 )
+ myCleared( false )
{
+ // Use precision equal to default Qt decimals
+ myPrecision = decimals();
+
setMinimum( min );
setMaximum( max );
setSingleStep( step );