View Full Version : QScrollbar handle does not display over a PNG in the Scrollbar background

11th December 2010, 00:01
Trying to use border-image for the scrollbar's background, but when I do so, the handle (slider) part does not appear. At least on the Mac I do not see the handle. Have not tested this on Windows yet.

Have successfully styled the same scrollbar using background for the scrollbar's background color, and border-image for the handle. Ideally, would like to use border-image for both components.

Similar conflict/limitation appeared when attempting a custom QSlider.

Any hints, please? Been knocking my brains out on this one.

QScrollBar:vertical {
border-image: url(:png/ScrollbarVerticalTrack_wide.png) 13 14 13 14;
border-top: 13px;
border-bottom: 13px;
border-right: 14px;
border-left: 14px;
width: 28px;

QScrollBar::handle:vertical {
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0.980296, y2:0, stop:0 rgba(243, 244, 242, 255), stop:0.423645 rgba(255, 255, 255, 255), stop:0.940887 rgba(243, 244, 242, 255));
width: 12px;
min-height: 50px;

Thanks Qt's.