Label QML Type
Styled text label with inherited font. More...
Properties
- background : Item
- bottomInset : real
- implicitBackgroundHeight : real
- implicitBackgroundWidth : real
- leftInset : real
- rightInset : real
- topInset : real
Detailed Description
\inherits
Text \inqmlmodule
QtQuick.Controls \since
5.7 \ingroup
text
Label extends Text with styling and font inheritance. The default colors and font are style specific. Label can also have a visual background item.
Label { text: "Label" }
You can use the properties of Text to change the appearance of the text as desired:
Label { text: "Hello world" font.pixelSize: 22 font.italic: true }
See also Customizing Label.
Property Documentation
background : Item |
This property holds the background item.
Note: If the background item has no explicit size specified, it automatically follows the control's size. In most cases, there is no need to specify width or height for a background item.
See also Customizing Label.
bottomInset : real |
\since
QtQuick.Controls 2.5 (Qt 5.12)
This property holds the bottom inset for the background.
See also Control Layout and topInset.
implicitBackgroundHeight : real |
\since
QtQuick.Controls 2.5 (Qt 5.12) \readonly
This property holds the implicit background height.
The value is equal to background ? background.implicitHeight : 0
.
See also implicitBackgroundWidth.
implicitBackgroundWidth : real |
\since
QtQuick.Controls 2.5 (Qt 5.12) \readonly
This property holds the implicit background width.
The value is equal to background ? background.implicitWidth : 0
.
See also implicitBackgroundHeight.
leftInset : real |
\since
QtQuick.Controls 2.5 (Qt 5.12)
This property holds the left inset for the background.
See also Control Layout and rightInset.
rightInset : real |
\since
QtQuick.Controls 2.5 (Qt 5.12)
This property holds the right inset for the background.
See also Control Layout and leftInset.
topInset : real |
\since
QtQuick.Controls 2.5 (Qt 5.12)
This property holds the top inset for the background.
See also Control Layout and bottomInset.