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. How to set ScrollBar indicator width?

How to set ScrollBar indicator width?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 584 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.
  • I Offline
    I Offline
    igor_stravinsky
    wrote on last edited by igor_stravinsky
    #1

    Qt QuickControls 2, version 5.10...

    I've got a vertical ScrollView, and I'm trying to change the width of the vertical ScrollBar's thumb/indicator. I've tried setting the width, and the implicitWidth of the contentItem, but neither seem to change things. Any ideas?

    ScrollBar.vertical: ScrollBar{
                    policy: ScrollBar.AsNeeded
                    anchors.top: parent.top
                    anchors.right: parent.right
                    anchors.bottom: parent.bottom
                    active:pressed
                    contentItem: Rectangle{
                        width:4
                        implicitWidth: 4
                        implicitHeight: 100
                        radius: width / 2
                        color: "black"
                    }
                }
    

    More specifically, I can change the width by tweaking the implicitWidth property, but I can't seem to get the width smaller than some minimum....

    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