[Qt-qml] Flickable overshoot property becomes boundsBehavior
henrik.hartz at nokia.com
henrik.hartz at nokia.com
Tue May 4 09:30:31 CEST 2010
Hi Rakesh,
On May 4, 2010, at 9:01 AM, ext Rakesh.Mutharaju at tieto.com wrote:
> Could someone tell me when do we get control to onFlickStarted:{} onFlickEnded:{} ??
Please see
http://doc.qt.nokia.com/4.7-snapshot/qml-flickable.html#onFlickEnded-signal
and
http://doc.qt.nokia.com/4.7-snapshot/qml-flickable.html#onFlickStarted-signal
> import Qt 4.6
>
> Rectangle {
>
> width: 400
> height: 400
> color: "lightblue"
> Flickable {
> width: 320
> height: 480
> contentWidth: image.width
> //contentHeight: image.height
> flickDirection: HorizontalFlick ---->>>>> Unable to assign [undefined] to int
You need to use the enum; Flickable.HorizontalFlick. Unfortunately the fact that you need to prefix enums with element names are not well documented in each of the Enum enumerations.
> interactive: true
> clip: true
> Rectangle {
> id:image
> width: 200
> height: 200
> color: "black"
> Text {
> x: 66
> y: 93
> text: "Hello World"
> color: "white"
> }
> }
> onFlickStarted:{
> console.log("start contentx"+contentX)
> console.log("start contenty"+contentY)
> }
> onFlickEnded:{
> console.log("end contentx"+contentX)
> console.log("end contenty"+contentY)
> }
> }
> }
>
> What's wrong with this code?? Please do provide more examples and update the documentation
I have created http://bugreports.qt.nokia.com/browse/QTBUG-10386 that describes the lack of fully qualified enums, please vote / subscribe to this task.
Thanks,
Henrik
> -----Original Message-----
> From: qt-qml-bounces at trolltech.com [mailto:qt-qml-bounces at trolltech.com] On Behalf Of Martin Jones
> Sent: Thursday, April 22, 2010 9:15 AM
> To: qt-qml at trolltech.com
> Subject: [Qt-qml] Flickable overshoot property becomes boundsBehavior
>
> So that we can add the DragOverBounds behavior.
>
> - StopAtBounds - the contents can not be dragged beyond the boundary of the flickable, and flicks will not overshoot.
> - DragOverBounds - the contents can be dragged beyond the boundary of the Flickable, but flicks will not overshoot.
> - DragAndOvershootBounds (default) - the contents can be dragged beyond the boundary of the Flickable, and can overshoot the boundary when flicked.
>
> This will affect QML releases after the 4.7.0 beta.
>
> --
> Martin
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
>
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
--
Henrik Hartz, Senior Qt Product Manager
Qt Development, Nokia
More information about the Qt-qml
mailing list