mirror of https://github.com/EspoTek/Labrador.git
espospinbox does not change value until enter is pressed. scoperangeenterdialog supports changeStepping()
This commit is contained in:
parent
50515b545c
commit
56468e9917
|
@ -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()
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue