Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    QScrollBar remove arrow

    General and Desktop
    3
    4
    7210
    Loading More Posts
    • 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
      stima_ua last edited by

      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 Reply Quote 0
      • A
        andre last edited by

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

        1 Reply Last reply Reply Quote 0
        • S
          stima_ua last edited by

          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 Reply Quote 0
          • BilbonSacquet
            BilbonSacquet last edited by

            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 Reply Quote 0
            • First post
              Last post