Create a styled QLabel with customizable font size and boldness.
(
parent, text, font_size=12, bold=False, style="color: #2c3e50; padding: 10px;"
)
| 46 | |
| 47 | |
| 48 | def 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 | |
| 63 | def create_styled_button(parent, text, min_size=None): |
no outgoing calls
no test coverage detected