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

Function create_input_field_V

bank_managment_system/QTFrontend.py:114–135  ·  view source on GitHub ↗

Create a horizontal layout with a label and a QLineEdit.

(parent, label_text, min_label_size=(120, 0))

Source from the content-addressed store, hash-verified

112
113
114def create_input_field_V(parent, label_text, min_label_size=(120, 0)):
115 """Create a horizontal layout with a label and a QLineEdit."""
116 frame = create_styled_frame(parent, style="padding: 7px;")
117 layout = QtWidgets.QVBoxLayout(frame)
118 layout.setContentsMargins(0, 0, 0, 0)
119 layout.setSpacing(0)
120
121 label = create_styled_label(
122 frame, label_text, font_size=12, bold=True, style="color: #2c3e50;"
123 )
124 if min_label_size:
125 label.setMinimumSize(QtCore.QSize(*min_label_size))
126
127 line_edit = QtWidgets.QLineEdit(frame)
128 line_edit.setStyleSheet(
129 "background-color: #f0f0f0; border: 1px solid #ccc; border-radius: 4px; padding: 8px;"
130 )
131 line_edit.setFont(FONT_SIZE)
132
133 layout.addWidget(label)
134 layout.addWidget(line_edit)
135 return frame, line_edit
136
137
138def show_popup_message(

Callers 1

update_userFunction · 0.85

Calls 2

create_styled_frameFunction · 0.85
create_styled_labelFunction · 0.85

Tested by

no test coverage detected