This commit is contained in:
luoliangyi 2024-04-26 18:06:53 +08:00
parent be2e39ad6d
commit 7872497479
1 changed files with 2 additions and 4 deletions

View File

@ -597,8 +597,7 @@ void Form_DeviceConfig::on_sliderClicked(int value)
else else
{ {
QDoubleSpinBox* doubleSpinBox = reinterpret_cast<QDoubleSpinBox*>(abstractSpinBox); QDoubleSpinBox* doubleSpinBox = reinterpret_cast<QDoubleSpinBox*>(abstractSpinBox);
double temp = value * doubleSpinBox->singleStep(); doubleSpinBox->setValue(value / 100.0);
doubleSpinBox->setValue(temp);
} }
break; break;
@ -634,8 +633,7 @@ void Form_DeviceConfig::on_doubleSpinboxClicked(double value)
QString sliderProverty = slider->property("config_name").toString(); QString sliderProverty = slider->property("config_name").toString();
if (sliderProverty == spinBoxProverty) if (sliderProverty == spinBoxProverty)
{ {
int temp = round(value / spinBox->singleStep()); slider->setValue(round(value * 100));
slider->setValue(temp);
break; break;
} }
} }