Configure QScrollBar Intersection Using Qt Style Sheet

I already configured my horizontal and vertical scrollbars using the stylesheet, no problem. But there is still an annoying tiny area that remains empty:

The intersection of horizontal and vertical stripes. Small rectangle.

How can I change my color? (Using style sheets)

Thanks!

Qt 4.7.1 on Mac OSX Snow Leopard

Ps: Even with the Qt style sheet as an example, its still white.

+4
source share
2 answers

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

QAbstractScrollArea::corner { background: somecolor; } 

Or, to hide it, use:

 background: transparent; 
+10
source

By default, the corner of the scroll area will be colored by the window palette. Unfortunately, you cannot change the Window panel using only style sheets. However, you can create a dummy widget and set it to display in the corner area using QAbstractScrollArea::setCornerWidget(QWidget *widget) , and then use the stylesheet to change the color of this widget.

+3
source

Source: https://habr.com/ru/post/1348099/


All Articles