Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Custom QScrollBar
Forum Update on Monday, May 27th 2025

Custom QScrollBar

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qscrollbarcustom widgetstylesheetqml
2 Posts 2 Posters 710 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.
  • EmrecpE Offline
    EmrecpE Offline
    Emrecp
    wrote on last edited by
    #1

    Hello!
    scrollbar.png
    HTML: https://paste.ofcode.org/CUGGDJHRSvBueKGqsQkrmn
    CSS: https://paste.ofcode.org/33ecknhamFsiZiqGgCHY9YA

    All scrollbars: https://codepen.io/GhostRider/pen/GHaFw
    I want to add "style-9" scrollbar (orange one) to my Qt project.

    I tried stylesheet but I was not successful.
    Can anyone replace css code to Qt's stylesheet or QML?
    Thanks all!

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      I don't think Qt stylesheet supports even half of this

      #style-9::-webkit-scrollbar-track
      {
      	-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
      	background-color: #F5F5F5;
      }
      

      so you best bet is to dig into
      https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qscrollbar
      and see how close you can get it.

      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