MauiKit Controls

SectionHeader.qml
1import QtQuick
2import QtQuick.Controls
3
4import org.mauikit.controls as Maui
5
6/**
7 * @inherit QtQuick.Controls.Pane
8 * @since org.mauikit.controls
9 *
10 * @brief A control for dividing sections with a title label and a message body.
11 * <a href="https://doc.qt.io/qt-6/qml-qtquick-controls-pane.html">This controls inherits from QQC2 Pane, to checkout its inherited properties refer to the Qt Docs.</a>
12 *
13 * The most common use for this control is to set it as the title of a section. For a more complete implementation of such use case refer to the SectionGroup, which uses this control as the section header.
14 * @see SectionGroup
15 */
16
17Pane
18{
19 id: control
20
21 /**
22 * @brief An alias to the ListItemTemplate handling the information labels, etc.
23 * Exposed for fine tuning more of its properties.
24 * @property ListItemtemplate SectionHeader::template
25 */
26 readonly property alias template : _template
27
28 /**
29 * @see ListItemTemplate::text1
30 */
31 property alias text1 : _template.text1
32
33 /**
34 * @see ListItemTemplate::text2
35 */
36 property alias text2 : _template.text2
37
38 /**
39 * @see ListItemTemplate::label1
40 */
41 readonly property alias label1 : _template.label1
42
43 /**
44 * @see ListItemTemplate::label2
45 */
46 readonly property alias label2 : _template.label2
47
48 implicitHeight: _template.implicitHeight + topPadding + bottomPadding
49 implicitWidth: _template.implicitWidth + leftPadding + rightPadding
50
51 padding: Maui.Style.defaultPadding
52 spacing: Maui.Style.space.small
53
54 contentItem: Maui.ListItemTemplate
55 {
56 id: _template
57
58 label1.font: Maui.Style.h2Font
59 label2.wrapMode: Text.WordWrap
60 label2.font.pointSize: Maui.Style.fontSizes.small
61 isMask: iconSizeHint <= 22
62 spacing: control.spacing
63 Maui.Controls.badgeText: control.Maui.Controls.badgeText
64 }
65
66 background: null
67}
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri May 2 2025 11:57:11 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.