C++ (Qt)QRect TimelineScrollbar::sliderRect() const { QStyleOptionSlider options; options.initFrom(this); options.maximum = this->maximum(); options.minimum = this->minimum(); options.sliderValue = this->value(); options.sliderPosition = options.sliderValue; options.singleStep = this->singleStep(); options.pageStep = this->pageStep(); options.orientation = this->orientation(); options.upsideDown = false; options.state = QStyle::State_Enabled; return style()->subControlRect(QStyle::CC_ScrollBar, &options, QStyle::SC_ScrollBarSlider); }