I have promoted a QDoubleSpinBox to SumDoubleSpinBox.
I want to link now the click() event of a button to the spinBox , whenever the button is clicked the spinBox value should become 0.0.
In the QT editor using Edit Signals / Slots i am linking the click() event to setZero() slot of the SumDoubleSpinBox class.
class SumDoubleBox : public QDoubleSpinBox
{
Q_OBJECT
public:
using QDoubleSpinBox::QDoubleSpinBox; // inherit c'tors
public slots:
void setZero();
private:
double m_defaultStep = 1.0;
};
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void SumDoubleBox::setZero()
{
QDoubleSpinBox::setValue(0.0);
}
Currently i am not able to set the spinbox value to 0.0