KanoopGuiQt 1.3.0
Qt GUI utility library
Loading...
Searching...
No Matches
LineEdit Class Reference

QLineEdit subclass with foreground and background color helpers. More...

#include <lineedit.h>

+ Inheritance diagram for LineEdit:
+ Collaboration diagram for LineEdit:

Public Member Functions

 LineEdit (QWidget *parent=nullptr)
 Construct with an optional parent.
 
 LineEdit (const QString &text, QWidget *parent=nullptr)
 Construct with initial text.
 
void setForegroundColor (const QColor &color)
 Set the foreground (text) color via a stylesheet.
 
void setBackgroundColor (const QColor &color)
 Set the background color via a stylesheet.
 

Detailed Description

QLineEdit subclass with foreground and background color helpers.

LineEdit provides setForegroundColor() and setBackgroundColor() as convenient alternatives to manual stylesheet construction.

Definition at line 13 of file lineedit.h.

Constructor & Destructor Documentation

◆ LineEdit() [1/2]

LineEdit::LineEdit ( QWidget *  parent = nullptr)
explicit

Construct with an optional parent.

Parameters
parentOptional QWidget parent

◆ LineEdit() [2/2]

LineEdit::LineEdit ( const QString &  text,
QWidget *  parent = nullptr 
)
explicit

Construct with initial text.

Parameters
textInitial text content
parentOptional QWidget parent

Member Function Documentation

◆ setBackgroundColor()

void LineEdit::setBackgroundColor ( const QColor &  color)

Set the background color via a stylesheet.

Parameters
colorNew background color

◆ setForegroundColor()

void LineEdit::setForegroundColor ( const QColor &  color)

Set the foreground (text) color via a stylesheet.

Parameters
colorNew foreground color

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