Animate removal from Positioner?

Sebastian Kügler sebas at kde.org
Thu Aug 11 12:08:05 UTC 2016


On Wednesday, August 10, 2016 8:24:15 PM UTC Marco Martin wrote:
> On Wednesday 10 August 2016 21:18:43 Michail Vourlakos wrote:

> > I am creating an alternative plasmoid for tasks and I would like your
> > wisdom around QML please..
> > 
> >
> > At some point of my code I am using a Grid(Positioner) and a Repeater
> > for the tasksModel but I can not find any way to animate the removal of
> > an item from the tasks model. There are add, move, populate transitions
> > but not for removals..
> 
> that's because when you remove it the thing gets deleted.
> the only way would be to execute such removal in an imperative way, having
> an  animation instance in the item, then calling item.animateRemoval()
> 
> but i guess if the removal happens because the model already removed the
> item,  that won't help you, because the instant the item goes away from the
> model, your delegate is deleted, so i don't see (clean) solutions

A shaderitem that isn't live (so keeps the rendered item seemingly around), 
use that to render the removal animation while the delegate is already deleted 
could work.
-- 
sebas

http://www.kde.org | http://vizZzion.org


More information about the Plasma-devel mailing list