FolderListModel and ListView Transitions



  • I am working on an application that uses a FolderListModel and a ListView, which is pretty centric to the application itself. When I try to add certain transitions, however--namely the remove and removeDisplaced transitions--the add and addDisplaced transitions are repeated instead. Is this a known bug with Qt itself? I'm using 5.1 with the MSVC 2012 64 bit (OpenGL) compiler/build.

    In addition, I tried setting the displaced transition, however, it is still overridden by the addDisplaced transition. Perhaps this is due to the way the FolderListModel works internally, rather than a bug?

    Some example ListView transitions that might help to reproduce this:

    @ add: Transition
    {
    ParallelAnimation
    {
    NumberAnimation { easing.type: Easing.OutCubic; properties: "y"; from: -100; duration: 300 }
    NumberAnimation { easing.type: Easing.Linear; properties: "opacity"; from: 0.2; to: 1; duration: 300 }
    }
    }

        addDisplaced: Transition {
            NumberAnimation { properties: "y"; duration: 300; easing.type: Easing.OutCubic;  }
        }
    
        remove: Transition
        {
            ParallelAnimation
            {
                NumberAnimation { easing.type: Easing.OutCubic; properties: "height"; to: 100; duration: 300 }
                NumberAnimation { easing.type: Easing.Linear; properties: "opacity"; from: 1; to: 0; duration: 300 }
            }
        }
    
        removeDisplaced: Transition
        {
            NumberAnimation { properties: "y"; duration: 300; easing.type: Easing.OutCubic;  }
        }
    
        displaced: Transition
        {
            NumberAnimation { properties: "y"; duration: 300; easing.type: Easing.OutCubic;  }
        }
    }@
    

    If you want to try it out, just add these transitions to a ListView with a QtQuick 2.0 FolderListModel, and try deleting one of the files in the directory and/or moving it out and then back in.


Log in to reply
 

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