开发者

Customize QScrollBar intersection using stylesheet Qt

I’ve already customize my horizontal and vert开发者_StackOverflowical scrollbars using a stylesheet no problem. But there still an annoying tiny area which remains blank :

The intersection of an horizontal and vertical bar. A small rectangle.

How could I change its color ? (Using stylesheets )

Thank you !

Qt 4.7.1 on Mac OSX Snow Leopard

Ps: Even on the Qt stylesheet example it’s still white.


I realise this is an old question, but I found a better solution.

QAbstractScrollArea::corner {
    background: somecolor;
}

Or, to hide it, use:

background: transparent;


By default, the scroll area corner will be painted with the Window palette. Unfortunately, you cannot change the Window palette using only stylesheets. However, what you can do is create a dummy widget and set it to be displayed in the corner area with QAbstractScrollArea::setCornerWidget(QWidget *widget), and then use the stylesheet to change the color of that widget.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜