KNewStuff

ConditionalLoader.qml
1/*
2 SPDX-FileCopyrightText: 2015 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
3
4 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
5*/
6
7import QtQuick 2.11
8import QtQuick.Layouts 1.11
9
10Loader
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-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:21:35 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.