ZTextLine

  • _images/textline.tpi.5926551acb.png

    text line with text “TextLine”

  • _images/textline-disabled.tpi.3033604346.png

    in disabled state

  • _images/textline-color.tpi.27c23b74f1.png

    with custom palette

ZTextLine is a widget that simply displays a single line of text.

In contrast to labels it does not reserve a cell as focus indicator and does not support forwarding focus to a “buddy” widget nor does it support showing a keyboard shortcut.

See also: Tui::ZLabel, Tui::ZTextLayout

Example

Tui::ZTextLine *text = new Tui::ZTextLine("Heading", dialog);
layout->addWidget(text);

Keyboard Usage

This widget does not react to any keyboard input.

Behavior

Labels by default don’t accept focus, are one cell high and have a expanding vertical layout policy. The size request of a label is the length of the text plus the contents margins.

The widget does not have visual distinct disabled or focused states.

Palette

Palette Color

Usage

control.fg, control.bg

Body of the text line widget

ZTextLine

class Tui::ZTextLine : public Tui::ZWidget

A simple text label widget without “buddy” widget support.

Constructors

ZTextLine(const QString &text, Tui::ZWidget *parent = nullptr)
ZTextLine(WithMarkupTag, const QString &markup, Tui::ZWidget *parent = nullptr)

Create the text line widget with the given text or markup.

Functions

QString text() const
void setText(const QString &text)

Get or set the plain text content of the text line widget.

When the content of the text line widget was most recently set using setMarkup() the returned text is empty.

QString markup() const
void setMarkup(const QString &markup)

Get or set the text content of the text line widget using markup.

When the content of the text line widget was most recently set using setText() the returned markup is empty.