Typography
Laying out your content
Headings
Kirigami provides a Heading that can be used for page or section titles.
import QtQuick
import QtQuick.Layouts
import org.kde.kirigami as Kirigami
Kirigami.ApplicationWindow {
title: "Kirigami Heading"
height: 400
width: 400
pageStack.initialPage: Kirigami.Page {
Kirigami.AbstractCard {
anchors.fill: parent
contentItem: ColumnLayout {
anchors.fill: parent
Kirigami.Heading {
text: "Heading level 1"
level: 1
}
Kirigami.Heading {
text: "Heading level 2"
level: 2
}
Kirigami.Heading {
text: "Heading level 3"
level: 3
}
Kirigami.Heading {
text: "Heading level 4"
level: 4
}
Kirigami.Heading {
text: "Heading level 5"
level: 5
}
}
}
}
}
Labels
Text elements should use the Label component from QtQuick Controls 2.

Text Alignment
You can align your text elements using the horizontalAlignment and verticalAlignment properties.




Rich Text
QML allows you to display (and edit) rich text. The behavior can be controlled via the textFormat property.

Theme
The font size of the Kirigami.Theme is available as Kirigami.Theme.defaultFont.pointSize in your application.
Last updated