org::kde::plasma::extras::ConditionalLoader Class Reference

Inherits FocusScope.


Item item
variant source
bool when

Detailed Description

This item can load any qml component, just like a Loader.

2.0 Important difference, the component will only be loaded when the "when" property is satisfied (ie evaluates to true) in this way it's easy to have big (and memory expensive) parts of the user interface load only when a certain condition is satisfied. For instance the contents of the tabs of a TabBar can be loaded only when they become the current page.
use a Loader instead

Definition at line 30 of file ConditionalLoader.qml.

Property Documentation

Item org::kde::plasma::extras::ConditionalLoader::item

The item instantiated from component, if any.

Definition at line 49 of file ConditionalLoader.qml.

variant org::kde::plasma::extras::ConditionalLoader::source

It can be a string with a path name of a qml file or a Component.

It's the component that will be loaded when "when" is true. If the component changes the old instantiated component will be deleted and the new one will be loaded instead.

Definition at line 44 of file ConditionalLoader.qml.

bool org::kde::plasma::extras::ConditionalLoader::when

Condition that tells when to load the declarative component.

Definition at line 36 of file ConditionalLoader.qml.

The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun May 24 2020 23:08:08 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.