Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt - Skinning a QScrollBar with Paint Event?
Forum Updated to NodeBB v4.3 + New Features

Qt - Skinning a QScrollBar with Paint Event?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Triebr
    wrote on last edited by
    #1

    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 Last reply
    0
    • J Offline
      J Offline
      joonhwan
      wrote on last edited by
      #2

      take a look "here":http://developer.qt.nokia.com/doc/qt-4.8/stylesheet-examples.html#customizing-qscrollbar

      joonhwan at gmail dot com

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved