PDA

View Full Version : enhanced scrollbar in Qt



tuli
28th December 2013, 18:03
hey,


I am interested in adding an "enhanced scrollbar" to my qt application.
An "enhanced Scvrollbar" is a scrollbar, that displays information in its background, like the ones in VS2013.

picture:
9885

I would really like to keep using a QScrollBar based widget, so that i maintain the look and feel of the platform. However, sublassing QScrollBar and overwriting the paintevent wont
do the trick, as would have to be able to draw the slider and the up/down arrows separately.

"styling" the scrollbar is not an option, because i want ot draw complex custom information in its background.

Has this been done before?


happy new year everyone!

wysota
28th December 2013, 20:19
You can draw all sub-components of a scrollbar via QStyle API so subclassing and reimplementing paintEvent() is the right approach.