QScrollBar and handle height
I can not set handle height. My css:
- border-image: url(:/images/scroll_bg.png);
- width: 20px;
- margin: 5px 5px 52px 0px;
- }
- background: url(:/images/handle.png);
- height: 5px;
- width: 5px;
- /*border-radius: 3px;*/
- }
- border-image: url(:/images/scroll_add_page.png);
- }
- margin: 5px 2px 0px 2px;
- border-image: url(:/images/scroll_sub_page.png);
- }
- border-image: url(:/images/add_line.png);
- height: 26px;
- margin: 0px 5px 5px 0px;
- subcontrol-origin: margin;
- }
- border-image: url(:/images/sub_line.png);
- height: 26px;
- margin: 0px 5px 26px 0px;
- subcontrol-position: bottom;
- subcontrol-origin: margin;
- }
- background: none;
- }
5 replies
I agree with Eddy, changing the default behavior of a scroll bar can confuse the user. However I would try to change values into the QStyleOptionSlider [doc.qt.nokia.com] to see if this trick works for drawing the scroll bar. It is just an idea.
thnx but i dont know how :(
- {
- QStyleOptionSlider option;
- option.initFrom(this);
- /*????*/
- }
Just a thought: why not use a QSlider [doc.qt.nokia.com]?
Sounds this is what you want and you can use stylesheet to change the look of the handle.
You must log in to post a reply. Not a member yet? Register here!


