ZTextLine¶
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 |
---|---|
|
Body of the text line widget |
ZTextLine¶
-
class Tui::ZTextLine : public Tui::ZWidget¶
A simple text label widget without “buddy” widget support.
Constructors
-
ZTextLine(WithMarkupTag, const QString &markup, Tui::ZWidget *parent = nullptr)¶
Create the text line widget with the given
text
ormarkup
.
Functions
-
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.
-
ZTextLine(WithMarkupTag, const QString &markup, Tui::ZWidget *parent = nullptr)¶