December 30, 2011

Triebr Triebr
Lab Rat
1 posts

Qt - Skinning a QScrollBar with Paint Event?

 

I’m trying to skin a QScrollBar by reimplementing the paintEvent() function. However, I don’t know how to get information on the position of the buttons and slider for accurate and detailed rendering. The QScrollBar seems to only supply information on the position of the slider, and doesn’t provide information on the buttons (up/down or left/right). I can’t hardcode it because the button positions are different on each Operating systems and I would prefer Qt to manage the buttons while I simply render them.

I was looking into a QStyle, but it also only seems to provide information on the slider and not the buttons.

Are there any examples/tutorials on how to properly skin a QScrollBar? Or if there any way to get information on the position/state of the ScrollBar buttons?

Any help is much appreciated!

1 reply

December 30, 2011

joonhwan joonhwan
Lab Rat
94 posts

take a look here [developer.qt.nokia.com]

 Signature 

joonhwan at gmail dot com

 
  ‹‹ QTabWidget: QLabel sometimes paints what’s on the last tab      Problem with my C++ library that uses a interface class[Solved] ››

You must log in to post a reply. Not a member yet? Register here!