En esta página

Label QML Type

Etiqueta de texto con estilo y fuente heredada. Más...

Import Statement: import QtQuick.Controls
Inherits:

Text

Propiedades

Descripción detallada

Label extiende Text con estilo y herencia de font. Los colores y la fuente por defecto son específicos del estilo. Label también puede tener un elemento visual background.

Etiqueta que muestra texto con estilo

Label {
    text: "Label"
}

Puede utilizar las propiedades de Text para cambiar la apariencia del texto como desee:

Label {
    text: "Hello world"
    font.pixelSize: 22
    font.italic: true
}

Véase también Personalización de la etiqueta.

Documentación de propiedades

background : Item

Esta propiedad contiene el elemento de fondo.

Nota: Si el elemento de fondo no tiene un tamaño explícito especificado, sigue automáticamente el tamaño del control. En la mayoría de los casos, no es necesario especificar la anchura o la altura de un elemento de fondo.

Véase también Personalización de etiquetas.

bottomInset : real [since QtQuick.Controls 2.5 (Qt 5.12)]

Esta propiedad contiene la inserción inferior para el fondo.

Esta propiedad se introdujo en QtQuick.Controls 2.5 (Qt 5.12).

Véase también Control Layout y topInset.

implicitBackgroundHeight : real [read-only, since QtQuick.Controls 2.5 (Qt 5.12)]

Esta propiedad contiene la altura implícita del fondo.

El valor es igual a background ? background.implicitHeight : 0.

Esta propiedad se introdujo en QtQuick.Controls 2.5 (Qt 5.12).

Véase también implicitBackgroundWidth.

implicitBackgroundWidth : real [read-only, since QtQuick.Controls 2.5 (Qt 5.12)]

Esta propiedad contiene el ancho implícito del fondo.

El valor es igual a background ? background.implicitWidth : 0.

Esta propiedad se introdujo en QtQuick.Controls 2.5 (Qt 5.12).

Véase también implicitBackgroundHeight.

leftInset : real [since QtQuick.Controls 2.5 (Qt 5.12)]

Esta propiedad contiene la inserción izquierda para el fondo.

Esta propiedad se introdujo en QtQuick.Controls 2.5 (Qt 5.12).

Véase también Control Layout y rightInset.

rightInset : real [since QtQuick.Controls 2.5 (Qt 5.12)]

Esta propiedad mantiene la inserción derecha para el fondo.

Esta propiedad se introdujo en QtQuick.Controls 2.5 (Qt 5.12).

Véase también Control Layout y leftInset.

topInset : real [since QtQuick.Controls 2.5 (Qt 5.12)]

Esta propiedad contiene la inserción superior para el fondo.

Esta propiedad se introdujo en QtQuick.Controls 2.5 (Qt 5.12).

Véase también Control Layout y bottomInset.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.