Fluid 1.3.0
Material Design for QtQuick and Qml
Loading...
Searching...
No Matches
SmoothFadeLoader Class Reference

Displays an item and smoothly fades when its source changes. More...

Inheritance diagram for SmoothFadeLoader:

Detailed Description

Displays an item and smoothly fades when its source changes.

SmoothFadeLoader is a Fluid transition utility rather than a standalone Material 3 component. Its fade duration can be selected from the application's Material 3 motion tokens.

This component loads an item with a Loader and smoothly fade to another item when the source URL is changed.

Items are loaded synchronously, also the item being hidden is not unloaded to avoid an unpleasant "flash" after the transition.

Example of usage:

import QtQuick 2.10
import Fluid.Controls 1.0
Item {
width: 640
height: 480
SmoothFadeLoader {
anchors.fill: parent
source: "MyComponent.qml"
fadeDuration: 400
MouseArea {
anchors.fill: parent
onClicked: parent.source = "AnotherComponent.qml"
}
}
}

Definition at line 40 of file SmoothFadeLoader.qml.


The documentation for this class was generated from the following file: