Qt Vertical Scroll bar stylesheets

Could you pls give me code snippets for styling scroll bar as show in the attached image thanks

Answers


setStyleSheet(QString::fromUtf8("QScrollBar:vertical {"              
    "    border: 1px solid #999999;"
    "    background:white;"
    "    width:10px;    "
    "    margin: 0px 0px 0px 0px;"
    "}"
    "QScrollBar::handle:vertical {"
    "    background: qlineargradient(x1:0, y1:0, x2:1, y2:0,"
    "    stop: 0 rgb(32, 47, 130), stop: 0.5 rgb(32, 47, 130), stop:1 rgb(32, 47, 130));"
    "    min-height: 0px;"
    "}"
    "QScrollBar::add-line:vertical {"
    "    background: qlineargradient(x1:0, y1:0, x2:1, y2:0,"
    "    stop: 0 rgb(32, 47, 130), stop: 0.5 rgb(32, 47, 130),  stop:1 rgb(32, 47, 130));"
    "    height: 0px;"
    "    subcontrol-position: bottom;"
    "    subcontrol-origin: margin;"
    "}"
    "QScrollBar::sub-line:vertical {"
    "    background: qlineargradient(x1:0, y1:0, x2:1, y2:0,"
    "    stop: 0  rgb(32, 47, 130), stop: 0.5 rgb(32, 47, 130),  stop:1 rgb(32, 47, 130));"
    "    height: 0 px;"
    "    subcontrol-position: top;"
    "    subcontrol-origin: margin;"
    "}"
    ));

Need Your Help

Transparent layout in Android?

android

I am developing one android application which use transparent activity.. I used the following link as reference but my problem is when i set background color as black i am not able see previous. i ...

Excluding directory

python django static-analysis pyflakes

I am working on a django project and am trying to run pyflakes on an app in it. I need to exclude the "migrations" directory from pyflakes.