Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Is there any way to obtain the physical geometry of the handle belonging to a QSlider?
handle
QSlider
I'm wanting to get the pixel location of the centre point of the handle so I can then draw text above it.
QStyleOptionSlider opt; initStyleOption(&opt); opt.subControls = QStyle::SC_SliderGroove | QStyle::SC_SliderHandle; QRect handleRect =style()->subControlRect(QStyle::CC_Slider, &opt, QStyle::SC_SliderHandle, this);
@VRonin Thanks for your response.
This seems pretty good. One question though, which header file contains the initStyleOption declaration?
initStyleOption
Please ignore my last comment. I wasn't subclassing the QSlider when I made that comment.