MCPcopy Index your code
hub / github.com/geekcomputers/Python / create_styled_label

Function create_styled_label

bank_managment_system/QTFrontend.py:48–60  ·  view source on GitHub ↗

Create a styled QLabel with customizable font size and boldness.

(
    parent, text, font_size=12, bold=False, style="color: #2c3e50; padding: 10px;"
)

Source from the content-addressed store, hash-verified

46
47
48def create_styled_label(
49 parent, text, font_size=12, bold=False, style="color: #2c3e50; padding: 10px;"
50):
51 """Create a styled QLabel with customizable font size and boldness."""
52 label = QtWidgets.QLabel(parent)
53 font = QtGui.QFont("Segoe UI", font_size)
54 if bold:
55 font.setBold(True)
56 font.setWeight(75)
57 label.setFont(font)
58 label.setStyleSheet(style)
59 label.setText(text)
60 return label
61
62
63def create_styled_button(parent, text, min_size=None):

Callers 3

create_input_fieldFunction · 0.85
create_input_field_VFunction · 0.85
create_page_with_headerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected