Adds a visual indication of the position and interaction of the contents in a Flickable element. More...
Inherits Item
A ScrollBar can be used with Flickable items as well as items derived from it, such as ListView and GridView items. ScrollBar should be a sibling of the Flickable. However, because ScrollBar is not a child of the Flickable, it has to be explicitly anchored to the Flickable.
Note: Both ScrollBar and ScrollDecorator components display bars to a Flickable item, but the ScrollDecorator is already anchored to the Flickable item.
Item {
x: 10
width: 400
anchors.top: parent.top
anchors.bottom: parent.bottom
ListView {
id: list
anchors.fill: parent
...
}
ScrollBar {
flickableItem: list
anchors { right: list.right; top: list.top }
}
}
Item {
x: 10
width: 400
anchors.top: parent.top
anchors.bottom: parent.bottom
GridView {
id: grid
anchors.fill: parent
...
}
ScrollBar {
id: vertical
flickableItem: grid
orientation: Qt.Horizontal
anchors { left: grid.left; bottom: grid.bottom }
}
}
See also ScrollDecorator, Flickable, Flickable, GridView, ListView, and ScrollDecorator.
read-onlyflickableItem : Flickable |
The Flickable to which the Scrollbar is anchored.
If the value is not set, the scroll bar is not shown.
The default value of the property is null.
read-onlyinteractive : bool |
If interactive is true, the user can move the flickableItem content by touching and dragging the scroll bar handle. If interactive is false, the scroll bar is indicative, that is, similar to a ScrollDecorator. Setting the interactive to false does not affect the key navigation support of ScrollBar that can be defined with Item::focus.
The default value is true.
read-onlyorientation : int |
The orientation of the scroll bar, either Qt.Vertical, or Qt.Horizontal.
The default value is Qt.Vertical.
read-onlypolicy : int |
The policy are the situations when the scroll bar is shown. A scroll bar can have the following policies:
The default value is Symbian.ScrollBarWhenScrolling.
See also flash().
Shows and then hides the scroll bar indicating to the user that there is scrollable content available in flickableItem. This method is most applicable when the policy is Symbian.ScrollBarWhenScrolling and the scroll bar is already hidden.