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

Function create_page_with_header

bank_managment_system/QTFrontend.py:243–258  ·  view source on GitHub ↗

Create a page with a styled header and return the page + main layout.

(parent, title_text)

Source from the content-addressed store, hash-verified

241# === Page Creation Functions ==
242# -------------------------------------------------------------------------------------------------------------
243def create_page_with_header(parent, title_text):
244 """Create a page with a styled header and return the page + main layout."""
245 page = QtWidgets.QWidget(parent)
246 main_layout = QtWidgets.QVBoxLayout(page)
247 main_layout.setContentsMargins(20, 20, 20, 20)
248 main_layout.setSpacing(20)
249
250 header_frame = create_styled_frame(
251 page, style="background-color: #ffffff; border-radius: 10px; padding: 10px;"
252 )
253 header_layout = QtWidgets.QVBoxLayout(header_frame)
254 title_label = create_styled_label(header_frame, title_text, font_size=30)
255 header_layout.addWidget(title_label, 0, QtCore.Qt.AlignHCenter | QtCore.Qt.AlignTop)
256
257 main_layout.addWidget(header_frame, 0, QtCore.Qt.AlignTop)
258 return page, main_layout
259
260
261def get_employee_name(parent, name_field_text="Enter Employee Name"):

Callers 13

search_resultFunction · 0.85
get_employee_nameFunction · 0.85
create_login_pageFunction · 0.85
create_home_pageFunction · 0.85
create_admin_menu_pageFunction · 0.85
create_add_employee_pageFunction · 0.85
show_employee_list_pageFunction · 0.85
show_total_moneyFunction · 0.85
create_account_pageFunction · 0.85

Calls 2

create_styled_frameFunction · 0.85
create_styled_labelFunction · 0.85

Tested by

no test coverage detected