![]() |
Home · All Classes · All Functions · Overviews |
[Inherits Item]
The Flickable item provides a surface that can be "flicked". More...
Inherited by GridView and ListView.
|
|
Flickable places its children on a surface that can be dragged and flicked.
Flickable { width: 200; height: 200; contentWidth: image.width; contentHeight: image.height Image { id: image; source: "bigimage.png" } }
Note: Flickable does not automatically clip its contents. If it is not full-screen it is likely that clip should be set to true.
Note: Due to an implementation detail items placed inside a flickable cannot anchor to it by id, use 'parent' instead.
These properties are true if the flickable view is positioned at the beginning, or end respecively.
The dimensions of the content (the surface controlled by Flickable). Typically this should be set to the combined size of the items placed in the Flickable.
Flickable { width: 320; height: 480; contentWidth: image.width; contentHeight: image.height Image { id: image; source: "bigimage.png" } }
These properties hold the surface coordinate currently at the top-left corner of the Flickable. For example, if you flick an image up 100 pixels, contentY will be 100.
flickDeceleration : real |
This property holds the rate at which a flick will decelerate.
The default is 500.
This property determines which directions the view can be flicked.
read-onlyflicking : bool |
This property holds whether the view is currently moving due to the user flicking the view.
The instantaneous velocity of movement along the x and y axes, in pixels/sec.
The reported velocity is smoothed to avoid erratic output.
interactive : bool |
A user cannot drag or flick a Flickable that is not interactive.
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 viewing detailed information on a location popup that is a child of the Flickable.
maximumFlickVelocity : real |
This property holds the maximum velocity that the user can flick the view in pixels/second.
The default is 2000 pixels/s
read-onlymoving : bool |
This property holds whether the view is currently moving due to the user either dragging or flicking the view.
overShoot : bool |
This property holds whether the surface may overshoot the Flickable's boundaries when flicked.
If overShoot is true the contents can be flicked beyond the boundary of the Flickable before being moved back to the boundary. This provides the feeling that the edges of the view are soft, rather than a hard physical boundary.
pressDelay : int |
This property holds the time to delay (ms) delivering a press to children of the Flickable. This can be useful where reacting to a press before a flicking action has undesireable effects.
If the flickable is dragged/flicked before the delay times out the press event will not be delivered. If the button is released within the timeout, both the press and release will be delivered.
visibleArea.xPosition : real |
visibleArea.widthRatio : real |
visibleArea.yPosition : real |
visibleArea.heightRatio : real |
These properties describe the position and size of the currently viewed area. The size is defined as the percentage of the full view currently visible, scaled to 0.0 - 1.0. The page position is in the range 0.0 (beginning) to size ratio (end), i.e. yPosition is in the range 0.0 - heightRatio.
These properties are typically used to draw a scrollbar, for example:
Rectangle { opacity: 0.5; anchors.right: MyListView.right-2; width: 6 y: MyListView.visibleArea.yPosition * MyListView.height height: MyListView.visibleArea.heightRatio * MyListView.height }
This handler is called when the view is flicked. A flick starts from the point that the mouse or touch is released, while still in motion.
This handler is called when the view stops moving due to user interaction. If a flick was generated, this handler will be triggered once the flick stops. If a flick was not generated, the handler will be triggered when the user stops dragging - i.e. a mouse or touch release.
This handler is called when the view begins moving due to user interaction.
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt 4.7.0 |