180 lines
2.9 KiB
Plaintext
180 lines
2.9 KiB
Plaintext
/* 全局样式 */
|
|
QMainWindow {
|
|
background-color: #f5f5f5;
|
|
}
|
|
|
|
/* 标签页样式 */
|
|
QTabWidget::pane {
|
|
border: 1px solid #cccccc;
|
|
background-color: white;
|
|
}
|
|
|
|
QTabBar::tab {
|
|
background-color: #e0e0e0;
|
|
color: #333333;
|
|
padding: 8px 20px;
|
|
margin-right: 2px;
|
|
border-top-left-radius: 4px;
|
|
border-top-right-radius: 4px;
|
|
}
|
|
|
|
QTabBar::tab:selected {
|
|
background-color: white;
|
|
color: #1976d2;
|
|
font-weight: bold;
|
|
}
|
|
|
|
QTabBar::tab:hover {
|
|
background-color: #d0d0d0;
|
|
}
|
|
|
|
/* 按钮样式 */
|
|
QPushButton {
|
|
background-color: #1976d2;
|
|
color: white;
|
|
border: none;
|
|
padding: 6px 16px;
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
min-width: 80px;
|
|
}
|
|
|
|
QPushButton:hover {
|
|
background-color: #1565c0;
|
|
}
|
|
|
|
QPushButton:pressed {
|
|
background-color: #0d47a1;
|
|
}
|
|
|
|
QPushButton:disabled {
|
|
background-color: #cccccc;
|
|
color: #666666;
|
|
}
|
|
|
|
/* 输入框样式 */
|
|
QLineEdit, QTextEdit, QComboBox {
|
|
border: 1px solid #cccccc;
|
|
border-radius: 4px;
|
|
padding: 5px;
|
|
background-color: white;
|
|
}
|
|
|
|
QLineEdit:focus, QTextEdit:focus, QComboBox:focus {
|
|
border: 2px solid #1976d2;
|
|
}
|
|
|
|
/* 树形控件样式 */
|
|
QTreeWidget {
|
|
border: 1px solid #cccccc;
|
|
background-color: white;
|
|
alternate-background-color: #f9f9f9;
|
|
}
|
|
|
|
QTreeWidget::item {
|
|
padding: 5px;
|
|
}
|
|
|
|
QTreeWidget::item:selected {
|
|
background-color: #1976d2;
|
|
color: white;
|
|
}
|
|
|
|
QTreeWidget::item:hover {
|
|
background-color: #e3f2fd;
|
|
}
|
|
|
|
/* 分组框样式 */
|
|
QGroupBox {
|
|
border: 1px solid #cccccc;
|
|
border-radius: 4px;
|
|
margin-top: 10px;
|
|
padding-top: 10px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
QGroupBox::title {
|
|
subcontrol-origin: margin;
|
|
subcontrol-position: top left;
|
|
padding: 0 5px;
|
|
color: #1976d2;
|
|
}
|
|
|
|
/* 状态栏样式 */
|
|
QStatusBar {
|
|
background-color: #f0f0f0;
|
|
border-top: 1px solid #cccccc;
|
|
}
|
|
|
|
/* 菜单样式 */
|
|
QMenuBar {
|
|
background-color: white;
|
|
border-bottom: 1px solid #cccccc;
|
|
}
|
|
|
|
QMenuBar::item {
|
|
padding: 5px 10px;
|
|
}
|
|
|
|
QMenuBar::item:selected {
|
|
background-color: #e3f2fd;
|
|
}
|
|
|
|
QMenu {
|
|
background-color: white;
|
|
border: 1px solid #cccccc;
|
|
}
|
|
|
|
QMenu::item {
|
|
padding: 5px 30px;
|
|
}
|
|
|
|
QMenu::item:selected {
|
|
background-color: #e3f2fd;
|
|
}
|
|
|
|
/* 滚动条样式 */
|
|
QScrollBar:vertical {
|
|
border: none;
|
|
background-color: #f0f0f0;
|
|
width: 12px;
|
|
margin: 0px;
|
|
}
|
|
|
|
QScrollBar::handle:vertical {
|
|
background-color: #cccccc;
|
|
min-height: 20px;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
QScrollBar::handle:vertical:hover {
|
|
background-color: #999999;
|
|
}
|
|
|
|
QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {
|
|
height: 0px;
|
|
}
|
|
|
|
/* 表格样式 */
|
|
QTableWidget {
|
|
border: 1px solid #cccccc;
|
|
gridline-color: #e0e0e0;
|
|
background-color: white;
|
|
}
|
|
|
|
QTableWidget::item {
|
|
padding: 5px;
|
|
}
|
|
|
|
QTableWidget::item:selected {
|
|
background-color: #1976d2;
|
|
color: white;
|
|
}
|
|
|
|
QHeaderView::section {
|
|
background-color: #f0f0f0;
|
|
padding: 5px;
|
|
border: 1px solid #cccccc;
|
|
font-weight: bold;
|
|
}
|