KNewStuff

ConditionalLoader.qml
1 /*
2  SPDX-FileCopyrightText: 2015 Aleix Pol Gonzalez <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
5 */
6 
7 import QtQuick 2.11
8 import QtQuick.Layouts 1.11
9 
10 Loader
11 {
12  id: root
13 
14  property Component componentTrue
15  property Component componentFalse
16  property bool condition
17 
18  Layout.minimumHeight: item && item.Layout ? item.Layout.minimumHeight : 0
19  Layout.minimumWidth: item && item.Layout ? item.Layout.minimumWidth : 0
20  sourceComponent: condition ? componentTrue : componentFalse
21 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 18 2021 22:43:49 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.