I am trying to change the background color of the scrollers in my QGraphicsView
using stylesheet. But it also changes the handler's shape from a nice rounded bar to an ugly rectangle. Is it possible to retain the original shape? Here is the code:
QString style = R"( QScrollBar:vertical {
background: rgb(61,61,61);
}
QScrollBar::handle:vertical {
background: rgb(119,119,119);
min-width: 20px;
}
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
background: none;
})";
myGraphicsView->setStyleSheet(style);
This is the original look:
This is after setting the stylesheet (now the handle is rectangular):