Label QML Type
Etichetta di testo formattata con carattere ereditato. Altro...
| Import Statement: | import QtQuick.Controls |
| Inherits: |
Proprietà
- background : Item
- bottomInset : real
(since QtQuick.Controls 2.5 (Qt 5.12)) - implicitBackgroundHeight : real
(since QtQuick.Controls 2.5 (Qt 5.12)) - implicitBackgroundWidth : real
(since QtQuick.Controls 2.5 (Qt 5.12)) - leftInset : real
(since QtQuick.Controls 2.5 (Qt 5.12)) - rightInset : real
(since QtQuick.Controls 2.5 (Qt 5.12)) - topInset : real
(since QtQuick.Controls 2.5 (Qt 5.12))
Descrizione dettagliata
Label estende Text con lo stile e l'ereditarietà dell'font. I colori e il carattere predefiniti dipendono dallo stile. Label può anche avere un elemento visivo background.

Label {
text: "Label"
}È possibile utilizzare le proprietà dell'Text per modificare l'aspetto del testo come desiderato:
Label {
text: "Hello world"
font.pixelSize: 22
font.italic: true
}Vedi anche Personalizzazione dell’etichetta.
Documentazione sulle proprietà
background : Item
Questa proprietà contiene l'elemento di sfondo.
Nota: se per l'elemento di sfondo non è specificata alcuna dimensione esplicita, esso assume automaticamente le dimensioni del controllo. Nella maggior parte dei casi, non è necessario specificare la larghezza o l'altezza di un elemento di sfondo.
Vedi anche Personalizzazione dell'etichetta.
bottomInset : real [since QtQuick.Controls 2.5 (Qt 5.12)]
Questa proprietà definisce il margine inferiore dello sfondo.
Questa proprietà è stata introdotta in QtQuick.Controls 2.5 (Qt 5.12).
Vedi anche Control Layout e topInset.
implicitBackgroundHeight : real [read-only, since QtQuick.Controls 2.5 (Qt 5.12)]
Questa proprietà contiene l'altezza implicita dello sfondo.
Il valore è pari a ` background ? background.implicitHeight : 0`.
Questa proprietà è stata introdotta in QtQuick.Controls 2.5 (Qt 5.12).
Vedi anche implicitBackgroundWidth.
implicitBackgroundWidth : real [read-only, since QtQuick.Controls 2.5 (Qt 5.12)]
Questa proprietà definisce la larghezza implicita dello sfondo.
Il valore è pari a background ? background.implicitWidth : 0.
Questa proprietà è stata introdotta in QtQuick.Controls 2.5 (Qt 5.12).
Vedi anche implicitBackgroundHeight.
leftInset : real [since QtQuick.Controls 2.5 (Qt 5.12)]
Questa proprietà definisce il margine sinistro dello sfondo.
Questa proprietà è stata introdotta in QtQuick.Controls 2.5 (Qt 5.12).
Vedi anche Control Layout e rightInset.
rightInset : real [since QtQuick.Controls 2.5 (Qt 5.12)]
Questa proprietà definisce il margine interno corretto per lo sfondo.
Questa proprietà è stata introdotta in QtQuick.Controls 2.5 (Qt 5.12).
Vedi anche Control Layout e leftInset.
topInset : real [since QtQuick.Controls 2.5 (Qt 5.12)]
Questa proprietà definisce l'inset superiore dello sfondo.
Questa proprietà è stata introdotta in QtQuick.Controls 2.5 (Qt 5.12).
Vedi anche Control Layout e 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.