magneticalc.QtWidgets2.QLabel2.QLabel2

# ``magneticalc`.`QtWidgets2`.`QLabel2`.`QLabel2``

class documentation

`class QLabel2(QLabel):`

Constructor: `QLabel2(text, icon, icon_color, icon_size, ...)`

View In Hierarchy

QLabel2 class.

Method | `__init__` | Initializes a QLabel.
Method | `set` | Sets the label properties.
Class Variable | `DebugLabels` | Undocumented

def __init__(self, text: `str`, icon: `str | None` = None, icon_color: `str | None` = None, icon_size: `QSize` = QSize(16, 16), expand: `bool` = True, align_right: `bool` = False, width: `int | None` = None, **kwargs):

Initializes a QLabel.

Please see `QLabel2.set()` for supported arguments.

Parameters
text: `str` | Text
icon: `str | None` | QtAwesome icon ID (optional)
icon_color: `str | None` | Icon color (optional)
icon_size: `QSize` | Icon size
expand: `bool` | Enable to expand
align_right: `bool` | Enable to align right
width: `int | None` | Width (optional)
**kwargs | Undocumented

def set(self, text: `str`, font: `QFont | None` = None, font_size: `str | None` = None, bold: `bool` = False, italic: `bool` = False, color: `str | tuple[int, int, int]` = 'black', css: `str | None` = None):

Sets the label properties.

Parameters
text: `str` | Text
font: `QFont | None` | QFont
font_size: `str | None` | Native font size
bold: `bool` | Enable for bold text
italic: `bool` | Enable for italic text
color: `str | tuple[int, int, int]` | Text color
css: `str | None` | Additional CSS (optional)

DebugLabels: `bool` =

Undocumented