void SomeSlider::mouseMoveEvent(QMouseEvent* event)
{
QStyleOptionSlider opt;
initStyleOption(&opt);
int left = 0;
int right = width();
int newPosition = QStyle::sliderValueFromPosition(minimum(), maximum(), event->pos().x() - left, right - left, opt.upsideDown);
setSliderPosition(newPosition);
}