Search for usage in LXR

FormLayout Class Reference
Inheritance diagram for FormLayout:


list< ItemtwinFormLayouts
bool wideMode

Additional Inherited Members

- Public Member Functions inherited from QtQuick.Item
 childAt (real x, real y)
bool contains (point point)
 dumpItemTree ()
 forceActiveFocus ()
 forceActiveFocus (Qt::FocusReason reason)
bool grabToImage (callback, targetSize)
point mapFromGlobal (real x, real y)
point mapFromItem (Item item, point p)
point mapFromItem (Item item, real x, real y)
rect mapFromItem (Item item, real x, real y, real width, real height)
rect mapFromItem (Item item, rect r)
point mapToGlobal (real x, real y)
point mapToItem (Item item, point p)
point mapToItem (Item item, real x, real y)
rect mapToItem (Item item, real x, real y, real width, real height)
rect mapToItem (Item item, rect r)
 nextItemInFocusChain (bool forward)

Detailed Description

This is the base class for Form layouts conforming to the Kirigami Human Interface Guidelines.

The layout consists of two columns: the left column contains only right-aligned labels provided by a Kirigami.FormData attached property, the right column contains left-aligned child types.

Child types can be sectioned using an QtQuick.Item or Kirigami.Separator with a Kirigami.FormData attached property, see FormLayoutAttached::isSection for details.

Example usage:

import QtQuick.Controls as QQC2
import org.kde.kirigami as Kirigami
Kirigami.FormLayout {
QQC2.TextField {
Kirigami.FormData.label: "Label:"
Kirigami.Separator {
Kirigami.FormData.label: "Section Title"
Kirigami.FormData.isSection: true
QQC2.TextField {
Kirigami.FormData.label: "Label:"
QQC2.TextField {
See also

Definition at line 46 of file FormLayout.qml.

Property Documentation

◆ twinFormLayouts

list<Item> FormLayout::twinFormLayouts

If for some implementation reason multiple FormLayouts have to appear on the same page, they can have each other in twinFormLayouts, so they will vertically align with each other perfectly.


Definition at line 70 of file FormLayout.qml.

◆ wideMode

bool FormLayout::wideMode

This property tells whether the form layout is in wide mode.

If true, the layout will be optimized for a wide screen, such as a desktop machine (the labels will be on a left column, the fields on a right column beside it), if false (such as on a phone) everything is laid out in a single column.

By default this property automatically adjusts the layout if there is enough screen space.

Set this to true for a convergent design, set this to false for a mobile-only design.

Definition at line 62 of file FormLayout.qml.

The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:49:07 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.