Sailfish OS
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS
Select Page
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS

API Documentation

Documentation for developing SailfishOS applications
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon

Contents

  • Properties
  • Detailed Description

FadeAnimation QML Type

A Sailfish-style fade animation More...

Import Statement: import Sailfish.Silica 1.0
  • List of all members, including inherited members

Properties

  • property : string

Detailed Description

The FadeAnimation type provides a common animation for applying fade-in and fade-out animations to items. It is commonly used within a Behavior applied to an item's opacity to automatically animate opacity changes to the item in a Sailfish-styled manner.

Here is a simple example:

 import QtQuick 2.2
 import Sailfish.Silica 1.0

 Page {
     property bool backgroundClicked

     MouseArea {
         anchors.fill: parent
         onClicked: backgroundClicked = !backgroundClicked
     }

     Rectangle {
         anchors.centerIn: parent
         width: Theme.itemSizeSmall
         height: width
         color: Theme.highlightBackgroundColor
         opacity: backgroundClicked ? Theme.highlightBackgroundOpacity : 1.0

         Behavior on opacity {
             FadeAnimation {}
         }
     }
 }

Note: FadeAnimator should be used instead of FadeAnimation where possible. FadeAnimator is a non-blocking variant that animates smoothly even if the main application thread has become unresponsive. FadeAnimation updates the item's opacity property every frame and can be used in bindings, whereas FadeAnimator only animates the item opacity in the render thread. In most use cases FadeAnimator is preferred.

FadeAnimation inherits the QtQuick NumberAnimation type, so any properties, signals and methods of NumberAnimation are also available to FadeAnimation objects. See the NumberAnimation documentation for its full list of available properties, signals and methods.

Property Documentation

property : string

This property holds the property that should be animated.

The default value is "opacity".


  • Legal
  • Contact Us
  • Jolla Mobile Ltd © 2025

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn