FormLayoutAttached
#include <formlayoutattached.h>
Properties | |
QQuickItem * | buddyFor |
bool | isSection |
QString | label |
int | labelAlignment |
Properties inherited from QObject | |
objectName | |
Signals | |
void | buddyForChanged () |
void | isSectionChanged () |
void | labelAlignmentChanged () |
void | labelChanged () |
Additional Inherited Members | |
Public Attributes inherited from QObject | |
typedef | QObjectList |
Protected Member Functions inherited from QObject | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const const |
int | receivers (const char *signal) const const |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
Detailed Description
This attached property contains the information for decorating a org::kde::kirigami::FormLayout:
It contains the text labels of fields and information about sections.
Some of its properties can be used with other Layout types.
- See also
- org::kde::kirigami::FormLayout
- Since
- 2.3
Definition at line 35 of file formlayoutattached.h.
Property Documentation
◆ buddyFor
|
readwrite |
This property can only be used in conjunction with a Kirigami.FormData.label, often in a layout that is a child of a org::kde::kirigami::FormLayout.
It then turns the item specified into a "buddy" of the label, making it work as if it were a child of the org::kde::kirigami::FormLayout.
A buddy item is useful for instance when the label has a keyboard accelerator, which when triggered provides active keyboard focus to the buddy item.
By default buddy is the item that Kirigami.FormData is attached to. Custom buddy can only be a direct child of that item; nested components are not supported at the moment.
Definition at line 130 of file formlayoutattached.h.
◆ isSection
|
readwrite |
If true, the child item of a org::kde::kirigami::FormLayout becomes a section separator, and may have different looks:
- To make it just a space between two fields, just put an empty item with FormData.isSection:
- To make it a space with a section title: TextField {Kirigami.FormData.label: "Label:"}Item {Kirigami.FormData.label: "Section Title"Kirigami.FormData.isSection: true}TextField {Kirigami.FormData.label: "Label:"}
- To make it a space with a section title and a separator line: TextField {Kirigami.FormData.label: "Label:"}Kirigami.Separator {Kirigami.FormData.label: "Section Title"Kirigami.FormData.isSection: true}TextField {Kirigami.FormData.label: "Label:"}
- See also
- org::kde::kirigami::FormLayout
Definition at line 94 of file formlayoutattached.h.
◆ label
|
readwrite |
The label for a org::kde::kirigami::FormLayout field.
Definition at line 44 of file formlayoutattached.h.
◆ labelAlignment
|
readwrite |
The alignment for the label of a org::kde::kirigami::FormLayout field.
Definition at line 48 of file formlayoutattached.h.
Constructor & Destructor Documentation
◆ FormLayoutAttached()
Definition at line 13 of file formlayoutattached.cpp.
◆ ~FormLayoutAttached()
|
override |
Definition at line 22 of file formlayoutattached.cpp.
Member Function Documentation
◆ buddyFor()
QQuickItem * FormLayoutAttached::buddyFor | ( | ) | const |
Definition at line 71 of file formlayoutattached.cpp.
◆ isSection()
bool FormLayoutAttached::isSection | ( | ) | const |
Definition at line 66 of file formlayoutattached.cpp.
◆ label()
QString FormLayoutAttached::label | ( | ) | const |
Definition at line 36 of file formlayoutattached.cpp.
◆ labelAlignment()
int FormLayoutAttached::labelAlignment | ( | ) | const |
Definition at line 51 of file formlayoutattached.cpp.
◆ qmlAttachedProperties()
|
static |
Definition at line 115 of file formlayoutattached.cpp.
◆ setBuddyFor()
void FormLayoutAttached::setBuddyFor | ( | QQuickItem * | aBuddyFor | ) |
Definition at line 76 of file formlayoutattached.cpp.
◆ setIsSection()
void FormLayoutAttached::setIsSection | ( | bool | section | ) |
Definition at line 56 of file formlayoutattached.cpp.
◆ setLabel()
Definition at line 26 of file formlayoutattached.cpp.
◆ setLabelAlignment()
void FormLayoutAttached::setLabelAlignment | ( | int | alignment | ) |
Definition at line 41 of file formlayoutattached.cpp.
The documentation for this class was generated from the following files:
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.