setValidator( new Validator( this, "double_spinbox_validator" ) );
rangeChange();
updateDisplay();
+
+ connect( editor(), SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) );
}
QtxDblSpinBox::QtxDblSpinBox( double min, double max, double step, QWidget* parent, const char* name )
setValidator( new Validator( this, "double_spinbox_validator" ) );
rangeChange();
updateDisplay();
+
+ connect( editor(), SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) );
}
QtxDblSpinBox::~QtxDblSpinBox()
QSpinBox::wheelEvent( e );
updateDisplay();
}
+
+void QtxDblSpinBox::onTextChanged( const QString& str )
+{
+ bool isBlock = myBlocked;
+ myBlocked = true;
+ interpretText();
+ myBlocked = isBlock;
+}
signals:
void valueChanged( double );
- void valueChanged( const QString& );
+ void valueChanged( const QString& );
public slots:
virtual void stepUp();
virtual void setValue( int );
virtual void setValue( double );
+protected slots:
+ virtual void onTextChanged( const QString& );
+
protected:
virtual void updateDisplay();
virtual void interpretText();