org::kde::plasma::extras::ConditionalLoader

Search for usage in LXR

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

Inherits FocusScope.

Properties

Item item
 
var source
 
bool when
 

Detailed Description

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

Since
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.
Deprecated:
use a Loader instead

Definition at line 18 of file ConditionalLoader.qml.

Property Documentation

◆ item

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

The item instantiated from component, if any.

Definition at line 37 of file ConditionalLoader.qml.

◆ source

var org::kde::plasma::extras::ConditionalLoader::source
read

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 32 of file ConditionalLoader.qml.

◆ when

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

Condition that tells when to load the declarative component.

Definition at line 24 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-2023 The KDE developers.
Generated on Thu Mar 23 2023 04:18:17 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.