/* 规程管理系统 - 白色浅蓝色QSS样式 */ /* ==================== 全局样式 ==================== */ QWidget { background-color: #ffffff; color: #2c3e50; font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif; font-size: 9pt; selection-background-color: #3498db; selection-color: #ffffff; } /* ==================== 主窗口 ==================== */ QMainWindow { background-color: #f8f9fa; border: none; } QMainWindow::separator { background-color: #bdc3c7; width: 2px; height: 2px; } /* ==================== 工具栏 ==================== */ QToolBar { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ecf0f1, stop: 1 #d5dbdb); border: none; spacing: 3px; padding: 5px; border-bottom: 2px solid #3498db; } QToolBar::handle { background: #bdc3c7; width: 8px; margin: 2px; } QToolBar QToolButton { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffffff, stop: 1 #ecf0f1); border: 1px solid #bdc3c7; border-radius: 6px; padding: 8px 12px; margin: 2px; color: #2c3e50; font-weight: bold; } QToolBar QToolButton:hover { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #e8f4fd, stop: 1 #d6eaff); border: 1px solid #3498db; box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3); } QToolBar QToolButton:pressed { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #d6eaff, stop: 1 #c3e2ff); border: 1px solid #2980b9; } QToolBar QToolButton:disabled { background: #f5f6fa; color: #95a5a6; border: 1px solid #d5dbdb; } /* ==================== 状态栏 ==================== */ QStatusBar { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ecf0f1, stop: 1 #d5dbdb); border-top: 1px solid #bdc3c7; color: #34495e; padding: 3px; } QStatusBar::item { border: none; } /* ==================== 按钮 ==================== */ QPushButton { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffffff, stop: 1 #ecf0f1); border: 1px solid #bdc3c7; border-radius: 8px; padding: 10px 16px; font-weight: bold; color: #2c3e50; min-width: 80px; min-height: 30px; } QPushButton:hover { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #e8f4fd, stop: 1 #d6eaff); border: 1px solid #3498db; box-shadow: 0 2px 8px rgba(52, 152, 219, 0.4); } QPushButton:pressed { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #d6eaff, stop: 1 #c3e2ff); border: 1px solid #2980b9; } QPushButton:disabled { background: #f5f6fa; color: #95a5a6; border: 1px solid #d5dbdb; } /* 特殊按钮颜色 */ QPushButton[text*="开始"], QPushButton[text*="执行"] { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #58d68d, stop: 1 #27ae60); border: 1px solid #2ecc71; color: #ffffff; } QPushButton[text*="开始"]:hover, QPushButton[text*="执行"]:hover { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #7dcea0, stop: 1 #58d68d); box-shadow: 0 2px 8px rgba(46, 204, 113, 0.4); } QPushButton[text*="停止"], QPushButton[text*="删除"] { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ec7063, stop: 1 #e74c3c); border: 1px solid #e67e22; color: #ffffff; } QPushButton[text*="停止"]:hover, QPushButton[text*="删除"]:hover { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #f1948a, stop: 1 #ec7063); box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4); } QPushButton[text*="重置"] { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #f7dc6f, stop: 1 #f39c12); border: 1px solid #f1c40f; color: #ffffff; } QPushButton[text*="重置"]:hover { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #f8e6a0, stop: 1 #f7dc6f); box-shadow: 0 2px 8px rgba(243, 156, 18, 0.4); } QPushButton[text*="报告"], QPushButton[text*="导入"] { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #bb8fce, stop: 1 #9b59b6); border: 1px solid #af7ac5; color: #ffffff; } QPushButton[text*="报告"]:hover, QPushButton[text*="导入"]:hover { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #d2b4de, stop: 1 #bb8fce); box-shadow: 0 2px 8px rgba(155, 89, 182, 0.4); } /* ==================== 标签 ==================== */ QLabel { color: #2c3e50; background: transparent; font-weight: normal; } QLabel[text="规程分类"], QLabel[text="规程列表"], QLabel[text="测试步骤:"] { font-size: 11pt; font-weight: bold; color: #3498db; padding: 5px 0px; } /* ==================== 表格视图 ==================== */ QTableView { background-color: #ffffff; alternate-background-color: #f8f9fa; gridline-color: #d5dbdb; border: 1px solid #bdc3c7; border-radius: 8px; selection-background-color: #3498db; selection-color: #ffffff; } QHeaderView::section { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffffff, stop: 1 #ecf0f1); color: #2c3e50; padding: 10px 8px; border: none; border-right: 1px solid #bdc3c7; border-bottom: 2px solid #3498db; font-weight: bold; } QHeaderView::section:first { border-top-left-radius: 8px; } QHeaderView::section:last { border-top-right-radius: 8px; border-right: none; } QHeaderView::section:hover { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #e8f4fd, stop: 1 #d6eaff); } /* ==================== 列表控件 ==================== */ QListWidget { background-color: #ffffff; border: 1px solid #bdc3c7; border-radius: 8px; padding: 5px; outline: none; } QListWidget::item { background-color: transparent; border: none; border-radius: 4px; padding: 10px 8px; margin: 2px; color: #2c3e50; } QListWidget::item:hover { background-color: #e8f4fd; border: 1px solid #3498db; } QListWidget::item:selected { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #3498db, stop: 1 #2980b9); color: #ffffff; border: 1px solid #5dade2; } /* ==================== 选项卡 ==================== */ QTabWidget::pane { border: 1px solid #bdc3c7; border-radius: 8px; background-color: #ffffff; top: -1px; } QTabBar::tab { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffffff, stop: 1 #ecf0f1); border: 1px solid #bdc3c7; padding: 10px 20px; margin-right: 2px; border-top-left-radius: 8px; border-top-right-radius: 8px; color: #34495e; } QTabBar::tab:selected { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #3498db, stop: 1 #2980b9); color: #ffffff; border-bottom-color: #ffffff; } QTabBar::tab:hover:!selected { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #e8f4fd, stop: 1 #d6eaff); } /* ==================== 输入控件 ==================== */ QLineEdit { background-color: #ffffff; border: 2px solid #bdc3c7; border-radius: 6px; padding: 8px 12px; color: #2c3e50; font-size: 9pt; } QLineEdit:focus { border: 2px solid #3498db; background-color: #fdfdfe; box-shadow: 0 0 8px rgba(52, 152, 219, 0.3); } QLineEdit:hover { border: 2px solid #3498db; } QSpinBox { background-color: #ffffff; border: 2px solid #bdc3c7; border-radius: 6px; padding: 8px; color: #2c3e50; min-width: 60px; } QSpinBox:focus { border: 2px solid #3498db; background-color: #fdfdfe; } QSpinBox::up-button, QSpinBox::down-button { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffffff, stop: 1 #ecf0f1); border: 1px solid #bdc3c7; width: 20px; } QSpinBox::up-button:hover, QSpinBox::down-button:hover { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #e8f4fd, stop: 1 #d6eaff); } QSpinBox::up-arrow { image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAGCAYAAAD37n+BAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAdgAAAHYBTnsmCAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABHSURBVBiVY/z//z8DJYCJgUIwqmFUw6gGcjWQ5QdqaKBYA7ma/lOggWwN5PqBGhoo1kCuJnI1/KdAA9ka/lOggVwN5PoBAJZzBTcQ48y8AAAAAElFTkSuQmCC); width: 8px; height: 4px; } QSpinBox::down-arrow { image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAGCAYAAAD37n+BAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAdgAAAHYBTnsmCAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABHSURBVBiVY2D4/58BFWBioBCMahgYDf8p0EC2hv8UaCBbA7ma/lOggWwN5Gqipwayff+fAg1ka/hPgQayNZCriboGAJd7BTc3gZfyAAAAAElFTkSuQmCC); width: 8px; height: 4px; } /* ==================== 复选框 ==================== */ QCheckBox { color: #2c3e50; spacing: 8px; } QCheckBox::indicator { width: 18px; height: 18px; border: 2px solid #bdc3c7; border-radius: 3px; background-color: #ffffff; } QCheckBox::indicator:hover { border: 2px solid #3498db; background-color: #e8f4fd; } QCheckBox::indicator:checked { background-color: #3498db; border: 2px solid #2980b9; image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAJCAYAAAAGuM1UAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAdgAAAHYBTnsmCAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABmSURBVBiVjZExDsIwEAT3JFpKSoo8gCfwCF7ACyipa3oCb+ANvIEn8AaegJYqLWnSRMmy1/YkFhftzNw9jUajUQMwBTaStpJOkmZm9jSzB/A0sy2wljS193O6nZmdgR/wBhYRcfsDGEwlvgBP2TAAAAAASUVORK5CYII=); } QCheckBox::indicator:checked:hover { background-color: #5dade2; } /* ==================== 组合框 ==================== */ QComboBox { background-color: #ffffff; border: 2px solid #bdc3c7; border-radius: 6px; padding: 8px 12px; color: #2c3e50; min-width: 100px; } QComboBox:focus { border: 2px solid #3498db; background-color: #fdfdfe; } QComboBox::drop-down { border: none; width: 30px; } QComboBox::down-arrow { image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAGCAYAAAD37n+BAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAdgAAAHYBTnsmCAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABHSURBVBiVY2D4/58BFWBioBCMahgYDf8p0EC2hv8UaCBbA7ma/lOggWwN5Gqipwayff+fAg1ka/hPgQayNZCriboGAJd7BTc3gZfyAAAAAElFTkSuQmCC); width: 12px; height: 8px; } QComboBox QAbstractItemView { background-color: #ffffff; border: 1px solid #bdc3c7; border-radius: 6px; color: #2c3e50; selection-background-color: #3498db; padding: 4px; } QComboBox QAbstractItemView::item { height: 30px; padding: 6px 12px; border: none; border-radius: 4px; } QComboBox QAbstractItemView::item:hover { background-color: #e8f4fd; } QComboBox QAbstractItemView::item:selected { background-color: #3498db; color: #ffffff; } /* ==================== 对话框 ==================== */ QDialog { background-color: #ffffff; border: 1px solid #bdc3c7; border-radius: 12px; } QDialogButtonBox QPushButton { min-width: 100px; padding: 10px 20px; } /* ==================== 消息框 ==================== */ QMessageBox { background-color: #ffffff; color: #2c3e50; border-radius: 8px; } QMessageBox QLabel { color: #2c3e50; font-size: 10pt; } QMessageBox QPushButton { min-width: 80px; padding: 8px 16px; } /* ==================== 表单布局 ==================== */ QFormLayout QLabel { font-weight: bold; color: #3498db; min-width: 100px; } /* ==================== 滚动条 ==================== */ QScrollBar:vertical { background-color: #f8f9fa; width: 12px; border-radius: 6px; margin: 0px; } QScrollBar::handle:vertical { background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #d5dbdb, stop: 1 #bdc3c7); border-radius: 6px; min-height: 30px; } QScrollBar::handle:vertical:hover { background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #3498db, stop: 1 #2980b9); } QScrollBar::handle:vertical:pressed { background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #2980b9, stop: 1 #21618c); } QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical { height: 0px; background: none; } QScrollBar:horizontal { background-color: #f8f9fa; height: 12px; border-radius: 6px; margin: 0px; } QScrollBar::handle:horizontal { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #d5dbdb, stop: 1 #bdc3c7); border-radius: 6px; min-width: 30px; } QScrollBar::handle:horizontal:hover { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #3498db, stop: 1 #2980b9); } QScrollBar::handle:horizontal:pressed { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #2980b9, stop: 1 #21618c); } QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal { width: 0px; background: none; } /* ==================== 菜单 ==================== */ QMenu { background-color: #ffffff; border: 1px solid #bdc3c7; border-radius: 8px; padding: 4px; color: #2c3e50; } QMenu::item { background-color: transparent; padding: 8px 16px; border-radius: 4px; margin: 1px; } QMenu::item:selected { background-color: #3498db; color: #ffffff; } QMenu::item:disabled { color: #95a5a6; } QMenu::separator { height: 1px; background-color: #d5dbdb; margin: 4px 8px; } /* ==================== 进度条 ==================== */ QProgressBar { background-color: #ffffff; border: 1px solid #bdc3c7; border-radius: 8px; text-align: center; color: #2c3e50; font-weight: bold; } QProgressBar::chunk { background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #3498db, stop: 1 #2980b9); border-radius: 7px; margin: 1px; } /* ==================== 工具提示 ==================== */ QToolTip { background-color: #ffffff; color: #2c3e50; border: 1px solid #3498db; border-radius: 6px; padding: 8px; font-size: 9pt; opacity: 240; } /* ==================== 分割器 ==================== */ QSplitter::handle { background-color: #d5dbdb; } QSplitter::handle:horizontal { width: 3px; border-radius: 1px; } QSplitter::handle:vertical { height: 3px; border-radius: 1px; } QSplitter::handle:hover { background-color: #3498db; } /* ==================== 特殊样式 ==================== */ /* 成功状态的行 */ QTableView::item[success="true"] { background-color: rgba(46, 204, 113, 0.1); color: #27ae60; } /* 失败状态的行 */ QTableView::item[success="false"] { background-color: rgba(231, 76, 60, 0.1); color: #e74c3c; } /* 主步骤样式 */ QTableView::item[main_step="true"] { background-color: rgba(52, 152, 219, 0.1); font-weight: bold; } /* 状态指示器 */ .status-success { color: #27ae60; font-weight: bold; } .status-error { color: #e74c3c; font-weight: bold; } .status-warning { color: #f39c12; font-weight: bold; } .status-info { color: #3498db; font-weight: bold; } /* ==================== 动画效果 ==================== */ QPushButton { transition: all 0.3s ease; } QToolButton { transition: all 0.3s ease; } QLineEdit { transition: border-color 0.3s ease, background-color 0.3s ease; } QListWidget::item { transition: background-color 0.2s ease, border-color 0.2s ease; } QTableView::item { transition: background-color 0.2s ease; }