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. QScrollBar remove arrow

QScrollBar remove arrow

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 8.0k Views
  • 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.
  • S Offline
    S Offline
    stima_ua
    wrote on last edited by
    #1

    I have QTableWidget and i need remove top and bottom arrow in scrollbar . Can i do this with stylesheet or something else?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      I would think that is possible, yes. Did you try it?

      1 Reply Last reply
      0
      • S Offline
        S Offline
        stima_ua
        wrote on last edited by
        #3

        Hm ... something like this

        @QScrollBar::sub-page:vertical {
        background-color: #1e1e1e;
        }

        QScrollBar::add-page:vertical {
        background-color: #1e1e1e;
        }

        QScrollBar::handle:vertical {
        border: 1px solid #292929;
        background: blue;
        }

        QScrollBar::add-line:vertical {
        width: 0px;
        height: 0px;
        }

        QScrollBar::sub-line:vertical {
        width: 0px;
        height: 0px;
        }@

        1 Reply Last reply
        0
        • BilbonSacquetB Offline
          BilbonSacquetB Offline
          BilbonSacquet
          wrote on last edited by
          #4

          The drawing/handling of a QScrollBar goes always through the style. Mainly you have no chance to do anything through widget manipulation because there is no children.

          The only way is through the style, for this you have 2 approachs possible:

          like you propose using style sheet settings (in fact internally through the QStyleSheetStyle)

          to define you own QStyle (per ex. inherited of QWindowsStyle).

          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