API Documentation

Documentation for developing SailfishOS applications

RemoveAnimation QML Type

A Sailfish-style item-removal animation More...

Import Statement: import Sailfish.Silica 1.0


Detailed Description

The RemoveAnimation type provides a common item-removal animation for SilicaListView and SilicaGridView.

Here is a simple example:

 import QtQuick 2.2
 import Sailfish.Silica 1.0

 SilicaListView {
     id: listView

     model: 100
     anchors.fill: parent
     delegate: BackgroundItem {
         id: backgroundItem

         onClicked: {
             listView.model = (listView.model == 100 ? 5 : 100)

         ListView.onAdd: AddAnimation {
             target: backgroundItem
         ListView.onRemove: RemoveAnimation {
             target: backgroundItem

         Label {
             x: Theme.paddingLarge
             anchors.verticalCenter: parent.verticalCenter
             color: parent.down ? Theme.highlightColor : Theme.primaryColor
             text: "Index: " + index

     VerticalScrollDecorator {}

The RemoveAnimation is recommended to be used to animate deletion of delegates.

See also ListItem::animateRemoval().

Property Documentation

duration : int

This property holds the duration of the remove animation, in milliseconds.

The default value is 150.

target : Item

The item that is animated on removal.

We use cookies to improve your user experience and to help us to develop our services. By continuing to browse the site, you approve of our use of cookies.