How to get the scrollbar to the left side of the window
Solved
QML and Qt Quick
-
I tried making this below change , but the scroll bar is not visible
Flickable { id : flickable width: parent.width height: 425 contentWidth: column.width; contentHeight: column.height clip: true ScrollBar.vertical: ScrollBar { width: 40 anchors.top: flickable.top anchors.left: flickable.right anchors.bottom: flickable.bottom policy: ScrollBar.AlwaysOn }
And adding the below change also does not change the scrollbar to the left
anchors.left: flickable.left
-
@James-A said in How to get the scrollbar to the left side of the window:
- anchoring to the left edge to the right edge hides the scrollbar due to the clip set to true on the flickable
anchors.left: flickable.right
- the example also shows to set the parent to the flickable's parent. currently the scrollbar gets added as content to the flickable
-
Thanks for the guide I was able to fix the problem with the below code
Flickable { id : flickable x: 0 y: 0 width: parent.width height: 425 contentHeight: rectangle.height contentWidth: rectangle.width clip: true ScrollBar.vertical: ScrollBar { width: 40 policy: ScrollBar.AlwaysOn parent: flickable.parent anchors.top: flickable.top anchors.left: flickable.left anchors.bottom: flickable.bottom }