/* style.qss */ /* 全局字体设置 */ * { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 48px; /* 全局字体大小 */ font-weight: bold; /* 全局字体粗细 */ color: #FFFFFF; /* 全局文字颜色,白色 */ } /* QWidget 样式 */ QWidget { background-color: #2C3E50; /* 深灰色背景 */ border-radius: 15px; /* 圆角半径 */ } /* QPushButton 样式 */ QPushButton { background-color: #3498DB; /* 蓝色按钮背景 */ color: #FFFFFF; /* 白色按钮文字 */ border: 2px solid #7F8C8D; /* 中灰色边框 */ padding: 20px 40px; /* 内边距 */ border-radius: 12px; /* 圆角半径 */ /* 去除伪状态样式 */ } /* QGroupBox 样式 */ QGroupBox { border: 2px solid #7F8C8D; /* 中灰色边框 */ border-radius: 12px; /* 圆角半径 */ margin-top: 30px; /* 标题上边距 */ background-color: #2C3E50; /* 深灰色背景 */ } QGroupBox::title { subcontrol-origin: margin; subcontrol-position: top left; padding: 0 10px; color: #FFFFFF; /* 白色标题文字 */ font-size: 48px; /* 标题字体大小 */ } /* QCheckBox 样式 */ QCheckBox { spacing: 20px; /* 图标与文字间距 */ color: #FFFFFF; /* 白色文字 */ font-size: 48px; /* 字体大小 */ font-weight: bold; /* 字体粗细 */ } QCheckBox::indicator { width: 48px; height: 48px; } QCheckBox::indicator::unchecked { border: 3px solid #7F8C8D; /* 中灰色边框 */ border-radius: 12px; /* 圆角半径 */ background: #2C3E50; /* 深灰色背景 */ } QCheckBox::indicator::checked { border: 3px solid #3498DB; /* 蓝色边框 */ border-radius: 12px; /* 圆角半径 */ background: #3498DB; /* 蓝色背景 */ } QCheckBox::indicator::checked::after { content: "\2713"; /* 勾选符号 */ color: #FFFFFF; /* 勾选符号颜色 */ font-size: 48px; /* 勾选符号大小 */ position: absolute; top: -12px; left: 12px; } /* QSpinBox 样式 */ QSpinBox, QDoubleSpinBox { background-color: #3498DB; /* 蓝色背景 */ border: 2px solid #7F8C8D; /* 中灰色边框 */ border-radius: 12px; /* 圆角半径 */ padding: 20px; /* 内边距 */ font-size: 48px; /* 字体大小 */ font-weight: bold; /* 字体粗细 */ color: #FFFFFF; /* 文字颜色 */ } QSpinBox::up-button, QSpinBox::down-button, QDoubleSpinBox::up-button, QDoubleSpinBox::down-button { background-color: #2C3E50; /* 深灰色按钮背景 */ border: none; width: 60px; height: 60px; border-radius: 12px; /* 圆角半径 */ } QSpinBox::up-button::arrow, QSpinBox::down-button::arrow, QDoubleSpinBox::up-button::arrow, QDoubleSpinBox::down-button::arrow { width: 24px; height: 24px; color: #FFFFFF; /* 箭头颜色 */ } /* QLabel 样式 */ QLabel { color: #FFFFFF; /* 白色文字 */ font-size: 48px; /* 字体大小 */ font-weight: bold; /* 字体粗细 */ } /* 消息框样式 */ QLabel#message { background-color: #E67E22; /* 橙色背景 */ color: #FFFFFF; /* 白色文字 */ padding: 20px; border-radius: 12px; font-size: 48px; font-weight: bold; }