Open 3D Engine AzQtComponents API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzQtComponents::LineEdit Class Reference

Class to handle styling and painting of QLineEdit widgets. More...

#include <LineEdit.h>


struct  Config
 Style configuration for the LineEdit class. More...

Static Public Member Functions

static void applySearchStyle (QLineEdit *lineEdit)
 Applies the "Search" style class to a QLineEdit.
static void removeSearchStyle (QLineEdit *lineEdit)
 Removes the "Search" style class from a QLineEdit.
static void applyDropTargetStyle (QLineEdit *lineEdit, bool valid)
static void removeDropTargetStyle (QLineEdit *lineEdit)
 Removes the "DropTarget" style class from a QLineEdit.
static Config loadConfig (QSettings &settings)
static Config defaultConfig ()
 Gets the default LineEdit style configuration.
static void setErrorMessage (QLineEdit *lineEdit, const QString &error)
static void setExternalError (QLineEdit *lineEdit, bool hasExternalError)
static void setErrorIconEnabled (QLineEdit *lineEdit, bool enabled)
static bool errorIconEnabled (QLineEdit *lineEdit)
 Returns true if the error icon will be shown if an error state is detected.
static QToolButton * getClearButton (const QLineEdit *lineEdit)
static void setEnableClearButtonWhenReadOnly (QLineEdit *lineEdit, bool enabled)
 Enables the clear button to be displayed on read-only LineEdits. Default value is false.


class BrowseEdit
class Style

Detailed Description

Class to handle styling and painting of QLineEdit widgets.

Member Function Documentation

◆ applyDropTargetStyle()

static void AzQtComponents::LineEdit::applyDropTargetStyle ( QLineEdit *  lineEdit,
bool  valid 

Applies the "DropTarget" style class to a QLineEdit.

validWhether the QLineEdit is a valid drop target or not.

◆ getClearButton()

static QToolButton * AzQtComponents::LineEdit::getClearButton ( const QLineEdit *  lineEdit)

Returns a pointer to the QToolButton created when QLineEdit::setClearButtonEnabled(true) is called. Returns nullptr if the clear button has not been created yet.

◆ loadConfig()

static Config AzQtComponents::LineEdit::loadConfig ( QSettings &  settings)

Sets the LineEdit style configuration.

settingsThe settings object to load the configuration from.
The new configuration of the LineEdit.

◆ setErrorIconEnabled()

static void AzQtComponents::LineEdit::setErrorIconEnabled ( QLineEdit *  lineEdit,
bool  enabled 

Sets whether an error icon and message should be displayed when the LineEdit is in an error state. Default value is true.

◆ setErrorMessage()

static void AzQtComponents::LineEdit::setErrorMessage ( QLineEdit *  lineEdit,
const QString &  error 

Sets the message to display in a tooltip if the QLineEdit validator detects an error.

◆ setExternalError()

static void AzQtComponents::LineEdit::setExternalError ( QLineEdit *  lineEdit,
bool  hasExternalError 

Set external error state. The global error state is calculated by an OR operation between external error state, validator and inputMask.

The documentation for this class was generated from the following file: