Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. FolderListModel and ListView Transitions

FolderListModel and ListView Transitions

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 790 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    QuantumCD
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved