marwyn
16th June 2011, 09:57
Hi,
I am currently trying to set a scrollbar with completely transparent background.
It works well for the part under the handler, which is completely transparent, but in the part where the handler is not, some kind of white canvas remains...
See a picture in the attachment.
Here's the stylesheet I use for Scrollbars:
QScrollBar:vertical {
background: transparent;
width: 19px;
padding: 0 0 20px 0;
margin: 20px 0 20px 0;
}
QScrollBar::handle:vertical {
background: transparent;
border-image: url(scrollbar.png) 4 0 4 0 repeat;
border-top: 4px;
border-bottom: 4px;
min-height: 39px;
}
QScrollBar::add-line:vertical {
border-top: solid 5px transparent;
background: none;
height: 20px;
subcontrol-position: bottom;
subcontrol-origin: padding;
}
QScrollBar::sub-line:vertical {
border: none;
background: none;
height: 20px;
subcontrol-position: top;
subcontrol-origin: margin;
}
QScrollBar::up-arrow:vertical{
image: url(uparrow.png);
}
QScrollBar::down-arrow:vertical{
image: url(downarrow.png);
}
Any idea ?
Thanks a lot.
Márwyn
I am currently trying to set a scrollbar with completely transparent background.
It works well for the part under the handler, which is completely transparent, but in the part where the handler is not, some kind of white canvas remains...
See a picture in the attachment.
Here's the stylesheet I use for Scrollbars:
QScrollBar:vertical {
background: transparent;
width: 19px;
padding: 0 0 20px 0;
margin: 20px 0 20px 0;
}
QScrollBar::handle:vertical {
background: transparent;
border-image: url(scrollbar.png) 4 0 4 0 repeat;
border-top: 4px;
border-bottom: 4px;
min-height: 39px;
}
QScrollBar::add-line:vertical {
border-top: solid 5px transparent;
background: none;
height: 20px;
subcontrol-position: bottom;
subcontrol-origin: padding;
}
QScrollBar::sub-line:vertical {
border: none;
background: none;
height: 20px;
subcontrol-position: top;
subcontrol-origin: margin;
}
QScrollBar::up-arrow:vertical{
image: url(uparrow.png);
}
QScrollBar::down-arrow:vertical{
image: url(downarrow.png);
}
Any idea ?
Thanks a lot.
Márwyn