fix tracking behavior

This commit is contained in:
laserpants 2016-05-03 08:53:21 +03:00
parent 6fb7183006
commit 0f1ad9ad85
3 changed files with 4 additions and 1 deletions

View File

@ -100,6 +100,7 @@ void Slider::mouseReleaseEvent(QMouseEvent *event)
if (d->slide) { if (d->slide) {
d->slide = false; d->slide = false;
setValue(sliderPosition());
return QAbstractSlider::mouseReleaseEvent(event); return QAbstractSlider::mouseReleaseEvent(event);
} }

View File

@ -69,7 +69,7 @@ public:
const int pos = Style::sliderPositionFromValue( const int pos = Style::sliderPositionFromValue(
q->minimum(), q->minimum(),
q->maximum(), q->maximum(),
q->value(), q->sliderPosition(),
span, span,
false); false);

View File

@ -125,6 +125,8 @@ SliderExamples::SliderExamples(QWidget *parent)
mainLayout->addWidget(frame); mainLayout->addWidget(frame);
connect(button, SIGNAL(pressed()), this, SLOT(updateSliderValue())); connect(button, SIGNAL(pressed()), this, SLOT(updateSliderValue()));
_slider2->setTracking(false);
} }
} }