Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QSlider Handle Size
Is there any way to obtain the physical geometry of the
handlebelonging to a
I'm wanting to get the pixel location of the centre point of the handle so I can then draw text above it.
VRonin last edited by VRonin
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
Please ignore my last comment. I wasn't subclassing the
QSliderwhen I made that comment.