How to set the size of the handle in a QSlider?
-
I'm trying to add some style to a QSlider I want to use a custom image as the handle that the user drags back and forth. While I've figured out how to use style sheets to have a custom icon drawn where the handle should be, the image is being drawn much too small and I cannot figure out how to make it larger.
Setting width and height seem to do nothing. I've tried using image, border-image and background-image, but none give me the ability to set the size of the handle image. Does anyone know how to do this?
This is the style sheet that I've been adding to my QSlider in QtDesigner:
QSlider::handle:vertical { image: url(:/data/icons/mixer-slider-handle.svg); width:64px; height:64px; }
-
Hi
Try with this
https://stackoverflow.com/questions/47691972/qslider-increase-handle-size
The height of slider handle is linked to height in QSlider::groove:horizontal