C

Flickable QML Type

Provides a surface that can be "flicked". More...

Import Statement: import QtQuick .
Since: Qt Quick Ultralite 1.0
Inherits:

Item

Inherited By:

ListView

Properties

Detailed Description

The Flickable item places its children on a surface that can be dragged and flicked, causing the view onto the child items to scroll. This behavior forms the basis of Items that are designed to show large numbers of child items, such as ListView and GridView.

In traditional user interfaces, views can be scrolled using standard controls, such as scroll bars and arrow buttons. In some situations, it is also possible to drag the view directly by pressing and holding a mouse button while moving the cursor. In touch-based user interfaces, this dragging action is often complemented with a flicking action, where scrolling continues after the user has stopped touching the view.

Flickable does not automatically clip its contents. If it is not used as a full-screen item, you should consider setting the clip property to true.

Example Usage

The following example shows a small view onto a large image in which the user can drag or flick the image in order to view different parts of it.

Flickable {
    width: 150; height: 100
    contentWidth: image.width; contentHeight: image.height

    Image { id: image; source: "qrc:/images/qtlogo.png" }
}

Property Documentation

VisibleArea.heightRatio : real

This property describes the height of the currently viewed area. It is defined as the percentage of the full view currently visible, scaled to 0.0 - 1.0


VisibleArea.widthRatio : real

This property describes the width of the currently viewed area. It is defined as the percentage of the full view currently visible, scaled to 0.0 - 1.0


VisibleArea.xPosition : real

This property describes the X position of the currently viewed area.


VisibleArea.yPosition : real

This property describes the Y position of the currently viewed area.


contentHeight : int

Height of the content (the surface controlled by Flickable).


contentItem : Item*

The internal item that contains the Items to be moved in the Flickable.


contentWidth : int

Width of the content (the surface controlled by Flickable).


contentX : int

This properties holds the surface X coordinate currently at the left of the Flickable.


contentY : int

This properties holds the surface Y coordinate currently at the top of the Flickable.


interactive : bool

This property describes whether the user can interact with the Flickable. A user cannot drag or flick a Flickable that is not interactive.

By default, this property is true.

This property is useful for temporarily disabling flicking. This allows special interaction with Flickable's children; for example, you might want to freeze a flickable map while scrolling through a pop-up dialog that is a child of the Flickable.


maximumFlickVelocity : Item*

This property holds the maximum velocity that the user can flick the view in pixels/second.

The default value is platform dependent.


movingHorizontally : bool

This property describes whether the view is currently moving horizontally, due to the user either dragging or flicking the view.


movingVertically : bool

This property describes whether the view is currently moving vertically, due to the user either dragging or flicking the view.


Available under certain Qt licenses.
Find out more.