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

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.
  • E Offline
    E Offline
    Emrecp
    wrote on 7 Jun 2020, 11:13 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
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 7 Jun 2020, 15:45 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

      1/2

      7 Jun 2020, 11:13

      • Login

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