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

Function create_styled_button

bank_managment_system/QTFrontend.py:63–87  ·  view source on GitHub ↗

Create a styled QPushButton with hover and pressed effects.

(parent, text, min_size=None)

Source from the content-addressed store, hash-verified

61
62
63def create_styled_button(parent, text, min_size=None):
64 """Create a styled QPushButton with hover and pressed effects."""
65 button = QtWidgets.QPushButton(parent)
66 if min_size:
67 button.setMinimumSize(QtCore.QSize(*min_size))
68 button.setStyleSheet("""
69 QPushButton {
70 background-color: #3498db;
71 color: white;
72 font-family: 'Segoe UI';
73 font-size: 16px;
74 font-weight: bold;
75 border-radius: 8px;
76 padding: 12px;
77 border: none;
78 }
79 QPushButton:hover {
80 background-color: #2980b9;
81 }
82 QPushButton:pressed {
83 background-color: #1c6ea4;
84 }
85 """)
86 button.setText(text)
87 return button
88
89
90def create_input_field(parent, label_text, min_label_size=(120, 0)):

Callers 11

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
create_account_pageFunction · 0.85
update_userFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected