Page Contents

Topics

Classes

QLLineEditor Class

#include <QLayers/qllineeditor.h>

Inherits: QLWidget

Public Functions

QLLineEditor(QWidget* parent = nullptr)
LAttribute* left_padding() const
void set_default_value(const QString& default_value)
void set_font_size(int size)
void set_font_size_f(qreal size)
void set_text(const QString& text)
void set_validator(const QValidator* validator)
LAttribute* text() const
LAttribute* text_color() const
virtual void update() override

Protected Functions

void eventFilter(QObject* object, QEvent* event) override

Signals

void text_edited(const QString& text)

Detailed Description

QLLineEditor Example

A QLLineEditor is a QLWidget that allows the user to edit a single line of text.

Member Function Documentation

QLLineEditor(QWidget* parent = nullptr)

Constructs a line editor.

LAttribute* left_padding() const

Returns a pointer to the left-padding attribute of the line editor.

void set_default_value(const QString& default_value)

Sets the default value to be used in the line editor if it is left empty after losing focus.

void set_font_size(int size)

Sets the size of the line editor's font.

void set_font_size_f(qreal size)

Sets the size of the line editor's font.

void set_text(const QString& text)

Sets the line editor's text.

void set_validator(const QValidator& validator)

Sets the validator to constrain values entered into the line editor.

LAttribute* text() const

Returns a pointer to the text attribute of the line editor.

LAttribute* text_color() const

Returns a pointer to the text color attribute of the line editor.

void text_edited(onst QString& text)

Signal

This signal is emitted when the line editor's text is changed.

void update()

Virtual

Override

Updates the line editor.

This function overrides QLThemeable::update() to update the line editor's style sheet.