espospinbox does not change value until enter is pressed. scoperangeenterdialog supports changeStepping()

This commit is contained in:
Chris Esposito 2018-09-17 19:12:07 +10:00
parent 50515b545c
commit 56468e9917
2 changed files with 8 additions and 0 deletions

View File

@ -14,6 +14,12 @@ scopeRangeEnterDialog::scopeRangeEnterDialog(QWidget *parent, bool buttonVisible
ui->vMinBox->setValue(yBot);
ui->timeWindowBox->setValue(window);
ui->buttonBox->setVisible(buttonVisible);
for (espoSpinBox* spinBox : {ui->vMaxBox, ui->vMinBox, ui->timeWindowBox, ui->delayBox})
{
spinBox->changeStepping(spinBox->value());
connect(spinBox, SIGNAL(valueChanged(double)), spinBox, SLOT(changeStepping(double)));
}
}
scopeRangeEnterDialog::~scopeRangeEnterDialog()

View File

@ -2,6 +2,7 @@
espoSpinBox::espoSpinBox(QWidget *parent) : QDoubleSpinBox(parent)
{
setKeyboardTracking(false);
//connect(this, SIGNAL(valueChanged(double)), this, SLOT(changeStepping(double)));
}
@ -63,6 +64,7 @@ void espoSpinBox::changeStepping(double value){
QValidator::State espoSpinBox::validate(QString& text, int& pos) const
{
qDebug() << pos;
prefixLength = pos;
return QValidator::State::Acceptable;
}