How to set ScrollBar indicator width?



  • 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....


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.