stop updating values continuously as sliders are dragged

This commit is contained in:
papush! 2022-01-10 00:14:17 +01:00
parent a59b494758
commit d359075c64

View File

@ -46,6 +46,7 @@ DoubleInput::DoubleInput(QObject *parent, double min, double max,
_spin_box->setValue(value); _spin_box->setValue(value);
_slider->setMaximum(_slider_resolution); _slider->setMaximum(_slider_resolution);
_slider->setValue(doubleToInt(value)); _slider->setValue(doubleToInt(value));
_slider->setTracking(false);
connect(_slider, &QSlider::valueChanged, connect(_slider, &QSlider::valueChanged,
this, &DoubleInput::onSliderValueChanged); this, &DoubleInput::onSliderValueChanged);
connect(_spin_box, QOverload<double>::of(&QDoubleSpinBox::valueChanged), connect(_spin_box, QOverload<double>::of(&QDoubleSpinBox::valueChanged),