Qt-interest Archive, June 2007
Vertical QSlider style sheet
Message 1 in thread
Hi all!
I cannot style vertical QSlider. The horizontal one has been styled using
some images, for the vertical one, it seems that after the style sheet is
applied the handle
is blocked (it doesn't move or if it moves it moves a bit but horizontally !
). Probably something in the style sheet definition is missing.
In Qt Designer, to make a quick test, I wrote this little style sheet:
QSlider::groove:vertical
{
background-color: blue;
border-color: magenta;
border-style: solid;
border-width: 1px;
width: 3px;
subcontrol-position: top;
subcontrol-origin: margin;
}
QSlider::handle:vertical
{
subcontrol-position: top;
subcontrol-origin: margin;
min-height: 5px;
width: 10px;
background-color: red;
border-color: black;
border-width: 1px;
border-style: solid;
}
The vertical slider is styled correctly but it doesn't move.
Any suggestions ?
Thanks in advance,
Angelo