[Qt-qml] can't scroll a flickable
michael.brasser at nokia.com
michael.brasser at nokia.com
Tue Aug 31 02:10:29 CEST 2010
Hi Bartosh,
This should work correctly in the recently released RC1 (the fix for http://bugreports.qt.nokia.com/browse/QTBUG-12295 is the relevant one).
Regards,
Michael
On 31/08/2010, at 6:23 AM, ext Bartosh Wroblevksy wrote:
>
> Hello QML'ers
>
> Want to check if this is a bug or if I am doing something wrong. Running the following code, Qt beta 2, if I do a keypress once, it flicks as expected
> to contentX = 1024. When I flick back and hit the key press again, it DOES NOT scroll to 1024. If I comment out the "Behavior on ContentX" portion, it magically works. What am I doing wrong?
>
>
> Flickable{
> id:panelsContainerFlickable
> anchors.fill: parent
>
> width: 800
> height: 600
>
> contentHeight:600
> contentWidth: 2048
>
>
>
> focus: true
> Keys.onPressed: { console.log( "scrolling")
> console.log( panelsContainerFlickable.contentX )
> panelsContainerFlickable.contentX = 1024
> console.log( panelsContainerFlickable.contentX )}
>
> Behavior on contentX {
> NumberAnimation {
> // easing.type: Easing.Linear
> duration: 500
> }
> }
>
>
> Rectangle {
>
> width: 2048; height: 600
> gradient: Gradient {
> GradientStop { position: 0.0; color: "red" }
> GradientStop { position: 0.33; color: "yellow" }
> GradientStop { position: 1.0; color: "green" }
> }
> rotation: 90
> }
> }
>
> Thanks,
> Bartosh
>
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
More information about the Qt-qml
mailing list