Changing element property while being flicked



  • I'm trying to bind an elements opacity to its (simplified) position when / while being flicked. the opacity is being set, according to
    @onOpacityChanged { console.log(opacity) }@

    but as long as the element is not released the changes wont take place / are not shown. This (mis-)behavior is true for all other visual property changes like color, scale ...

    I guess this is due to the way dragged / flicked elements are drawn in QML?
    Could there be a workaround to this shortcoming?

    greets, droco


  • Moderators

    Hi,

    Just another suggestion, would PathView be suitable to you requirement ?
    Check "PathView":http://qt-project.org/doc/qt-5/qml-qtquick-pathview.html docs. There's "PathAttribute":http://qt-project.org/doc/qt-5/qml-qtquick-pathattribute.html object which can be used to set Opacity or Scale etc.. Once used the corresponding properties are set properly as per the Item's position in the List. Check the example in it's description.
    With PathView you can simulate a Simple ListView or other Complex paths by setting the proper Path like PathQuad, PathLine etc..


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.