Hi all !
I'm playing with the new widgets, pseudo-states and sub-controls added in qt 4.3, since the documentations is still lacking I have some questions.
1) I cannot find a way to define style sheet for the QScrollBar widget, I try redefining its sub-controls.. without any results, someone have made also a simple test ?
2) I have a problem to define the style sheet for a vertical QSlider, the horizontal one code that I use is:
{
border-image: url(qss/sl_groove.png) 1;
border-width: 1;
height: 1px;
}
{
image: url(qss/h_handle.png);
top: -6px;
}
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;
}
To copy to clipboard, switch view to plain text mode
the vertical one works visually but I cannot move the handle (it is blocked) (probably something in the code is missing):
{
border-image: url(qss/sl_groove_v.png) 1;
border-width: 1;
}
{
image: url(qss/v_chandle.png);
}
QSlider::groove:vertical
{
border-image: url(qss/sl_groove_v.png) 1;
border-width: 1;
}
QSlider::handle:vertical
{
image: url(qss/v_chandle.png);
}
To copy to clipboard, switch view to plain text mode
3) I don't understand how to set the style sheet of a generic widget (suppose QSlider) and then setting a different style sheet only for a custom widget class derived from the generic one (i.e a ColorSlider that inherit QSlider). The code that I use, without any good result have this form:
QSlider {
......
}
ColorSlider {
......
}
I try to use also several types selector, and I can made a distinction only using the ID Selector (defining the ObjectName for the widget). I would like to define different style sheet for different kind of widgets.
Best,
Angelo
Bookmarks