[Qt-qml] PathView moving property when the index changes

247 views
Skip to first unread message

David Cordero

unread,
Oct 8, 2011, 9:52:42 AM10/8/11
to qt-...@qt.nokia.com
Hi all,

I am checking the documentation of the qml component PathView and It has properties and signals for detecting when the user stops the movement. But it doesn't work when the pathview ends the animation because of an incrementCurrentIndex or decrementCurrentIndex functions.

As pathview index can't be managed automatically by the component and you have to capture Left and Right key for doing it:

        Keys.onPressed : {                   
        if (event.key == Qt.Key_Left) 
        decrementCurrentIndex()                  
        if (event.key == Qt.Key_Right) 
        incrementCurrentIndex()
       }


¿How can I know when the movement of the pathview ended when using keys instead of mouse events?

--
David Cordero 


Artem Marchenko

unread,
Oct 8, 2011, 8:23:52 PM10/8/11
to David Cordero, qt-...@qt.nokia.com
Hi David

When you navigate between list items programmatically, the move always takes highlightMoveDuration ms (well, at least if highlightRangeMode is StrictlyEnforceRange).

I am not sure if you can get a signal for the end of movement though. As a workaround you could have a timer for highlightMoveDuration ms.

Best regards,
Artem.

_______________________________________________
Qt-qml mailing list
Qt-...@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Reply all
Reply to author
Forward
0 new messages