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
8import QtQuick.Layouts
9
10Loader {
11 property Component componentTrue
12 property Component componentFalse
13 property bool condition
14
15 Layout.minimumHeight: item ? item.Layout.minimumHeight : 0
16 Layout.minimumWidth: item ? item.Layout.minimumWidth : 0
17 sourceComponent: condition ? componentTrue : componentFalse
18}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 24 2024 11:54:38 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.