Label QML Type

Styled text label with inherited font. 更多...

Import Statement: import QtQuick.Controls 2.2
开始支持版本: Qt 5.7
基类:

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
  }

参见 Customizing Label.

属性

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.

参见 Customizing Label.