IconLabel
Properties | |
alias | alignment |
int | bottomPadding |
alias | color |
int | display |
alias | font |
var | icon |
alias | label |
int | leftPadding |
int | padding |
int | rightPadding |
int | spacing |
alias | text |
int | topPadding |
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
A icon and a label put together in two possible positions, a horizontal or vertical layout.
This control inherits from QQC2 Item, to checkout its inherited properties refer to the Qt Docs.
This is a base template for other controls, such as for setting the contents of the ToolButton, Button, MenuItem, etc, in the style.
- Note
- This control is only a visual item, and does not handle any event or gets any focus.
- Warning
- To set the
icon
properties, you need to set it as a dictionary map. The supported key values are:- name
- source
- color
- height
- width
- cache
- See also
- icon
You can find a more complete example at this link.
Definition at line 71 of file IconLabel.qml.
Property Documentation
◆ alignment
|
read |
The preferred horizontal alignment of the text.
By default this is set to Qt.AlignLeft
.
- Note
- The alignment will depend on the width of the container. If there is a width bigger then the implicit width, then the alignment will be set as preferred.
Definition at line 124 of file IconLabel.qml.
◆ bottomPadding
|
read |
◆ color
|
read |
The color for the text.
By default this is set to Theme.textColor
.
- Note
- to set the icon color, use the
icon.color
property.
Definition at line 82 of file IconLabel.qml.
◆ display
|
read |
How to display the icon and the label.
The available options are:
- ToolButton.TextBesidesIcon
- ToolButton.TextUnderIcon
- ToolButton.TextOnly
- ToolButton.IconOnly
By default this is set to ToolButton.IconOnly
Definition at line 117 of file IconLabel.qml.
◆ font
|
read |
The font properties of the text.
By default this is set to Style.defaultFont
.
Definition at line 162 of file IconLabel.qml.
◆ icon
|
read |
This is a dictionary, which represents the properties for the icon.
The supported key values are:
- name
- source
- color
- height
- width
- cache
Definition at line 106 of file IconLabel.qml.
◆ label
|
read |
An alias tot he QQC2 Label handling the text.
Exposed for fine tuning the label properties.
Definition at line 168 of file IconLabel.qml.
◆ leftPadding
|
read |
◆ padding
|
read |
The total padding all around the element.
By default this is set to 0
.
Definition at line 130 of file IconLabel.qml.
◆ rightPadding
|
read |
◆ spacing
|
read |
The spacing value between the icon element and the text label.
By default this is set to Style.space.small
.
- See also
- Style
Definition at line 156 of file IconLabel.qml.
◆ text
|
read |
The text to be used.
Definition at line 87 of file IconLabel.qml.
◆ topPadding
|
read |
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:56:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.