Provides utility methods to style a QLabel. More...
#include <LabelStyler.h>
Public Member Functions | |
void | setFontSize (int pointSize) |
Sets the font size of the label. | |
void | setFont (const QFont &font) |
Sets the font of the label. | |
void | setTextColor (const QColor &color) |
Sets the text color of the label. | |
void | setLabel (QLabel *lbl) |
Assigns the label to be styled. | |
Public Attributes | |
QLabel * | label = nullptr |
Pointer to the QLabel to style. | |
Provides utility methods to style a QLabel.
This class allows modification of font size, font family, and text color of a QLabel instance.
void LabelStyler::setFont | ( | const QFont & | font | ) |
Sets the font of the label.
font | The QFont to apply. |
void LabelStyler::setFontSize | ( | int | pointSize | ) |
Sets the font size of the label.
pointSize | Font size in points. |
|
inline |
Assigns the label to be styled.
lbl | Pointer to the QLabel. |
void LabelStyler::setTextColor | ( | const QColor & | color | ) |
Sets the text color of the label.
color | The QColor to apply. |