Kirigami2

controls/Label.qml
1 /*
2  * SPDX-FileCopyrightText: 2011 by Marco Martin <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.0-or-later
5  */
6 
7 import QtQuick 2.1
8 import org.kde.kirigami 2.4 as Kirigami
9 import QtQuick.Controls 2.0 as QQC2
10 
11 // TODO KF6: Remove!
12 /**
13  * This is a label which uses the current Theme.
14  *
15  * The characteristics of the text will be automatically set according to the
16  * current Theme. If you need a more customized text item use the Text component
17  * from QtQuick.
18  *
19  * You can use all elements of the QML Text component, in particular the "text"
20  * property to define the label text.
21  *
22  * @inherit QtQuick.Templates.Label
23  * @deprecated use QtQuick.Templates.Label directly, it will be styled appropriately
24  */
25 QQC2.Label {
26  height: Math.round(Math.max(paintedHeight, Kirigami.Units.gridUnit * 1.6))
27  verticalAlignment: lineCount > 1 ? Text.AlignTop : Text.AlignVCenter
28 
29  activeFocusOnTab: false
30 
31  Component.onCompleted: {
32  console.warn("Kirigami.Label is deprecated. Use QtQuickControls2.Label instead")
33  }
34 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Jan 29 2023 04:11:03 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.