Label QML Type
Étiquette de texte stylisée avec police héritée. Plus d'informations...
| Import Statement: | import QtQuick.Controls |
| Inherits: |
Propriétés
- 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))
Description détaillée
Label étend Text avec le style et l'héritage font. Les couleurs et la police par défaut sont spécifiques au style. L'étiquette peut également avoir un élément visuel background.

Label { text: "Label" }
Vous pouvez utiliser les propriétés de Text pour modifier l'apparence du texte comme vous le souhaitez :
Label { text: "Hello world" font.pixelSize: 22 font.italic: true }
Voir également Personnalisation de l'étiquette.
Propriété Documentation
background : Item |
Cette propriété contient l'élément d'arrière-plan.
Remarque : si la taille de l'élément d'arrière-plan n'est pas explicitement spécifiée, elle suit automatiquement la taille du contrôle. Dans la plupart des cas, il n'est pas nécessaire de spécifier la largeur ou la hauteur d'un élément d'arrière-plan.
Voir aussi Personnalisation de l'étiquette.
bottomInset : real |
Cette propriété définit l'encart inférieur de l'arrière-plan.
Cette propriété a été introduite dans QtQuick.Controls 2.5 (Qt 5.12).
Voir également Control Layout et topInset.
implicitBackgroundHeight : real |
Cette propriété définit la hauteur implicite de l'arrière-plan.
La valeur est égale à background ? background.implicitHeight : 0.
Cette propriété a été introduite dans QtQuick.Controls 2.5 (Qt 5.12).
Voir également implicitBackgroundWidth.
implicitBackgroundWidth : real |
Cette propriété définit la largeur implicite de l'arrière-plan.
La valeur est égale à background ? background.implicitWidth : 0.
Cette propriété a été introduite dans QtQuick.Controls 2.5 (Qt 5.12).
Voir aussi implicitBackgroundHeight.
leftInset : real |
Cette propriété définit l'encart gauche de l'arrière-plan.
Cette propriété a été introduite dans QtQuick.Controls 2.5 (Qt 5.12).
Voir également Control Layout et rightInset.
rightInset : real |
Cette propriété définit l'encart droit de l'arrière-plan.
Cette propriété a été introduite dans QtQuick.Controls 2.5 (Qt 5.12).
Voir également Control Layout et leftInset.
topInset : real |
Cette propriété définit l'encart supérieur de l'arrière-plan.
Cette propriété a été introduite dans QtQuick.Controls 2.5 (Qt 5.12).
Voir également Control Layout et bottomInset.
© 2025 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.