PDA

View Full Version : 4.3: Styling vertical QSlider



Angelo Moriconi
14th June 2007, 10:38
Hi all !

I cannot find the way to style a vertical QSlider, the qss code that I use for the horizontal slider is:

QSlider::groove:horizontal
{
border-image: url(qss/sl_groove.png) 1;
border-width: 1;
height: 1px;
}

QSlider::handle:horizontal
{
image: url(qss/h_handle.png);
top: -6px;
}

I use the same code (changing height with width) for the vertical pseudo-states but the slider handle doesn't move anymore and seems to move horizontally !?!

Probably something is missing but I don't know what...

Any suggestions about that ?

Thanks in advance,

Angelo

jpn
14th June 2007, 10:44
Maybe this helps: Styling QProgressBar and QScrollBar (http://labs.trolltech.com/blogs/2007/06/12/styling-qprogressbar-and-qscrollbar/).

Angelo Moriconi
14th June 2007, 11:24
Jpn: I know this article (I made a lot of request about that to girish :)) but every widget have different style behaviour: every style sheet definition could have different mandatory parameters to work depending on the widget to style and the pseudo-states to style.

Angelo

Angelo Moriconi
18th June 2007, 09:00
I use this code,


QSlider::groove:vertical
{
background: blue;
border-color: blue;
border-width:1 px;
width: 3px;
}

QSlider::handle:vertical
{
subcontrol-position: center center;
width: 10px;
background-color: red;
border-color: black;
border-width: 1px;
border-style: solid;
}

But I cannot move the handle, surely something is still missing, I try to use min-height as suggested by the documentation without any good result.

Any suggestion ?

Angelo

ucomesdag
18th June 2007, 16:04
Got the same problem here... Guess we have to wait for 4.3.1 and file a bug in the mean time...