QScrollBar remove arrow



  • I have QTableWidget and i need remove top and bottom arrow in scrollbar . Can i do this with stylesheet or something else?



  • I would think that is possible, yes. Did you try it?



  • Hm ... something like this

    @QScrollBar::sub-page:vertical {
    background-color: #1e1e1e;
    }

    QScrollBar::add-page:vertical {
    background-color: #1e1e1e;
    }

    QScrollBar::handle:vertical {
    border: 1px solid #292929;
    background: blue;
    }

    QScrollBar::add-line:vertical {
    width: 0px;
    height: 0px;
    }

    QScrollBar::sub-line:vertical {
    width: 0px;
    height: 0px;
    }@



  • The drawing/handling of a QScrollBar goes always through the style. Mainly you have no chance to do anything through widget manipulation because there is no children.

    The only way is through the style, for this you have 2 approachs possible:

    like you propose using style sheet settings (in fact internally through the QStyleSheetStyle)

    to define you own QStyle (per ex. inherited of QWindowsStyle).


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.