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. How to change the handle's height of the qsrcollbar ?
Forum Updated to NodeBB v4.3 + New Features

How to change the handle's height of the qsrcollbar ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 179 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.
  • nicker playerN Offline
    nicker playerN Offline
    nicker player
    wrote on last edited by Chris Kawa
    #1

    I used the code below.but didnt work.
    the handle still higher than 30px. it is related to the qwidget height I ve put. so how to change it?
    scrollArea->verticalScrollBar()->setStyleSheet("QScrollBar::handle:vertical{height:30px;}");

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SimonSchroeder
      wrote on last edited by
      #2

      Try without :vertical. From my understanding :vertical is a pseudo state of QScrollBar and not of its handle. I'm not sure how this would work if you really needed both :vertical and ::handle. But, at least in the example you provided you set the stylesheet on a specific scroll bar. In that case you really don't have to distinguish between vertical and horizontal scroll bars.

      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