CSText QML Type

Display a text label. More...

Import Statement: import CSDataQuick.Components 1.0
Inherits:

CSGraphics

Properties

Detailed Description

It can display both plain and rich text in HTML-style markup.

The font property can specify the font family, pixelSize, weight, style etc. If unspecified font family is returned from function UtilsJS::getBestFontSize.

If fontSizeMode is Text.Fit, the font pixelSize will fit within the item width and height. If fontSizeMode is Text.FixedSize, Text.VerticalFit or Text.HorizontalFit, the text may extend beyond the height and width specified for the Text item or may not use up all the specified height and width. The text typically does not fill all of the specified height for the Text item.

Column {
    spacing: 5
    CSText {
        width: 100
        height: 20
        text: 'Plain Text'
    }
    CSText {
        width: 100
        height: 20
        text: '<b>Rich</b> <i>Text</i>'
    }
}

Property Documentation

align : enumeration

Sets the horizontal alignment of the text within the item width.

The valid values for horizontalAlignment are Text.AlignLeft, Text.AlignRight, Text.AlignHCenter and Text.AlignJustify.


font : font

The text font.


fontSizeMode : enumeration

This property specifies how the font size of the displayed text is determined.

See also fontSizeMode.


text : string

This property holds the text to display.

It can be plain text or richt text defined using HTML markup.