ScrollIndicator QML Type | Qt Labs Controls 5.6

Qt 5.6 | Qt Labs Controls | QML Types | ScrollIndicator QML Type

Qt 5.6.3 Reference Documentation

# ScrollIndicator QML Type

A non-interactive scroll indicator control. More...

Import Statement: | import Qt.labs.controls 1.0
Inherits: | Control

- List of all members, including inherited members

## Properties

- active : bool
- indicator : Item
- orientation : enumeration
- position : real
- size : real

## Attached Properties

- horizontal : ScrollIndicator
- vertical : ScrollIndicator

## Detailed Description

ScrollIndicator is a non-interactive indicator that indicates the current scroll position. A scroll indicator can be either vertical or horizontal, and can be attached to any Flickable, such as ListView and GridView.

      Flickable {
          // ...
          ScrollIndicator.vertical: ScrollIndicator { }
      }

Note: When ScrollIndicator is attached vertically or horizontally to a Flickable, its geometry and the following properties are automatically set and updated as appropriate:

- orientation
- position
- size
- active

Note: Types in the Qt.labs module are not guaranteed to remain compatible in future versions.

See also ScrollBar, Customizing ScrollIndicator, and Indicator Controls.

## Property Documentation

active : bool

This property holds whether the indicator is active, that is, when the attached Flickable is moving.

indicator : Item

This property holds the indicator item.

See also Customizing ScrollIndicator.

orientation : enumeration

This property holds the orientation of the indicator.

Possible values:

Constant | Description
--- | ---
`Qt.Horizontal` | Horizontal
`Qt.Vertical` | Vertical (default)

position : real

This property holds the position of the indicator, scaled to `0.0 - 1.0`.

See also Flickable::visibleArea.

size : real

This property holds the size of the indicator, scaled to `0.0 - 1.0`.

See also Flickable::visibleArea.

## Attached Property Documentation

ScrollIndicator.horizontal : ScrollIndicator

This property attaches a horizontal scroll indicator to a Flickable.

      Flickable {
          contentWidth: 2000
          ScrollIndicator.horizontal: ScrollIndicator { }
      }

ScrollIndicator.vertical : ScrollIndicator

This property attaches a vertical scroll indicator to a Flickable.

      Flickable {
          contentHeight: 2000
          ScrollIndicator.vertical: ScrollIndicator { }
      }