Warning, /frameworks/kirigami/tests/HeaderFooterTest.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  *  SPDX-FileCopyrightText: 2023 Marco Martin <mart@kde.org>
0003  *
0004  *  SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 
0007 import QtQuick
0008 import QtQuick.Controls
0009 import QtQuick.Layouts
0010 
0011 import org.kde.kirigami as Kirigami
0012 
0013 ColumnLayout {
0014     width: 600
0015     height: 600
0016 
0017     Text {
0018         text: `Implicit width: ${hfLayout.implicitWidth}\nImplicit height: ${hfLayout.implicitHeight}`
0019     }
0020     Kirigami.HeaderFooterLayout {
0021         id: hfLayout
0022         Layout.fillWidth: true
0023         Layout.fillHeight: true
0024         header: ToolBar {
0025             contentItem: Rectangle {
0026                 color: "red"
0027                 implicitWidth: 20
0028                 implicitHeight: 20
0029             }
0030         }
0031         contentItem: Rectangle {
0032             color: "lightgreen"
0033             implicitWidth: 300
0034             implicitHeight: 50
0035         }
0036         footer: ToolBar {
0037             contentItem: Rectangle {
0038                 color: "blue"
0039                 height: 30
0040             }
0041         }
0042     }
0043     Rectangle {
0044         color: "yellow"
0045         Layout.preferredHeight: 40
0046         Layout.fillWidth: true
0047         Layout.fillHeight: true
0048     }
0049 }