PDA

View Full Version : Problems styling QScrollBar / QPushButton



December
20th January 2008, 06:53
Hi All,

I am add support for user created 'skins' to my program by loading style sheets.

Everything works great except 2 small problems:

1) I can't seem to set the lighter color on the etched text on a disabled QPushButton, or disable the Etching all together.

2) I can't set a solid background on a QScrollBar, it always shows up with hatching, and I can't figure out how to set the 2nd color on the hatch.

http://www.moonchild.name/images/Snapshot3.png

Here is the style sheet code for the scrollbar:


scrollbar:vertical {
border: 1px solid #802B8E;
background: black;
width: 15px;
margin: 15px 0px 15px 0px;
}

scrollbar::handle:vertical {
background: #333333;
min-height: 15px;
}

scrollbar::add-line:vertical {
border-left: 1px solid #802B8E;
border-bottom: 1px solid #802B8E;
background: black;
height: 15px;
subcontrol-position: top;
subcontrol-origin: margin;
}

scrollbar::sub-line:vertical {
border-left: 1px solid #802B8E;
border-top: 1px solid #802B8E;
background: black;
height: 15px;
subcontrol-position: bottom;
subcontrol-origin: margin;
}

scrollbar::up-arrow:vertical {
image: url(./arrow_down.png)
}

scrollbar::down-arrow:vertical {
image: url(./arrow_up.png)
}


Anyone know what's going wrong?

Thanks