Create a horizontal layout with a label and a QLineEdit.
(parent, label_text, min_label_size=(120, 0))
| 112 | |
| 113 | |
| 114 | def 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 | |
| 138 | def show_popup_message( |
no test coverage detected