/* === Shared === */
QStackedWidget, QLabel, QPushButton, QRadioButton, QCheckBox, 
QGroupBox, QStatusBar, QToolButton, QComboBox, QDialog {
    background-color: #222222;
    color: #BBBBBB;
    font-family: "Segoe UI";
}

/* === QWidget === */
QWidget:window {
    background: #222222;
    color: #BBBBBB;
    font-family: "Segoe UI";
}

/* === QToolTip === */
QToolTip {
    background-color: #000000;
    border: 2px solid #333333;
    color: yellow;
}

/* === QPushButton === */
QPushButton {
    border: 1px solid #333333;
    padding: 4px;
    min-width: 65px;
    min-height: 12px;
}

QPushButton:hover {
    background-color: #333333;
    border-color: #444444;
}

QPushButton:pressed {
    background-color: #111111;
    border-color: #333333;
    color: yellow;
}

QPushButton:disabled {
    color: #333333;
}

/* === Checkable items === */
QCheckBox::indicator, QRadioButton::indicator, QTreeView::indicator {
    width: 16px;
    height: 16px;
    background-color: #111111;
    border: 1px solid #333333;
}

QRadioButton::indicator {
    border-radius: 8px;
}

QCheckBox::indicator::checked, QRadioButton::indicator::checked, QTreeView::indicator::checked {
    background-color: qradialgradient(cx:0.5, cy:0.5, fx:0.25, fy:0.15, radius:0.3, stop:0 #BBBBBB, stop:1 #111111);
}

QCheckBox::indicator:disabled, QRadioButton::indicator:disabled, QTreeView::indicator:disabled {
    background-color: #444444;
}

QCheckBox::indicator::checked:disabled, QRadioButton::indicator::checked:disabled, QTreeView::indicator::checked:disabled {
    background-color: qradialgradient(cx:0.5, cy:0.5, fx:0.25, fy:0.15, radius:0.3, stop:0 #BBBBBB, stop:1 #444444);
}

/* === QComboBox === */
QComboBox {
    background-color: black;
    border: 1px solid #333333;
    color: white;
    padding:1px 2em 1px 3px;
}

QComboBox::drop-down {
    subcontrol-origin: padding;
    subcontrol-position: top right;
    border-left: 1px solid #333333;
}

QComboBox::down-arrow {
    border: 2px solid #333333;
    width: 6px;
    height: 6px;
    background: #5f5f5f;
}

/* === QGroupBox === */
QGroupBox {
    border: 2px solid #333333;
    margin-top: 2ex;
}

QGroupBox::title {
    color: yellow;
    subcontrol-origin: margin;
    subcontrol-position: top left;
    margin-left: 5px;
}

/* === QTabWidget === */
QTabWidget::pane {
    background: #222222;
    border: 2px solid #333333;
}

/* === QTabBar === */
QTabBar::tab {
    background: transparent;
    border: 1px solid #333333;
    border-bottom: none;
    color: #BBBBBB;
    padding-left: 5px;
    padding-right: 10px;
    padding-top: 3px;
    padding-bottom: 3px;
}

QTabBar::tab:hover {
    background-color: #333333;
    border: 1px solid #444444;
    border-bottom: none;
}

QTabBar::tab:selected {
    background-color: #111111;
    border: 1px solid #333333;
    border-top: 1px solid yellow;
    border-bottom: none;
    color: yellow
}

/* === QToolBar === */
QToolBar {
    background-color: #222222;
    border: none;
    padding: 1px;
}

QToolBar:handle {
    background: #222222;
    border-left: 1px dotted yellow;
    color: #BBBBBB;
}

QToolBar::separator {
    width: 6px;
    background-color: #222222;
}

/* === QToolButton === */
QToolButton {
    border: 1px solid #333333;
    margin: 1px;
}

QToolButton:hover {
    background-color: #333333;
    border: 1px solid #444444;
}

QToolButton[popupMode="1"] { /* only for MenuButtonPopup */
    padding-right: 20px; /* make way for the popup button */
}

QToolButton::menu-button {
    border-left: 1px solid #333333;
    background: transparent;
    width: 16px;
}

QToolButton::menu-button:hover {
    border-left: 1px solid #444444;
    background: transparent;
    width: 16px;
}

QToolButton:checked, QToolButton:pressed {
    background-color: #111111;
    color: yellow;
}

/* === QMenu === */
QMenu {
    background-color: black;
    border: 1px solid gray;
    color: white;
    padding: 1px;
}

QMenu::item {
    padding: 2px 25px 2px 20px;
    border: 1px solid transparent;
}

QMenu::item:disabled {
    color: #666666;
}

QMenu::item:selected {
    border-color: gray;
    background: #222222;
}

QMenu::icon:checked {

}

QMenu::separator {
    height: 1px;
    background: #222222;
    margin-left: 10px;
    margin-right: 10px;
    margin-top: 1px;
    margin-bottom: 1px;
}

QMenu::indicator {
    width: 13px;
    height: 13px;
}

/* === QMenuBar === */
QMenuBar {
    background-color: black;
    color: white;
}

QMenuBar::item {
    background: transparent;
}

QMenuBar::item:disabled {
    color: gray;
}

QMenuBar::item:selected {
    background: #222222;
}

QMenuBar::item:pressed {
    background: #444444;
}
 
/* === QScrollBar:vertical === */
QScrollBar:vertical {
    background: #111111;
    width: 16px;
    margin: 16px 0 16px 0;
}

QScrollBar::handle:vertical {
    background: #555555;
    min-height: 16px;
}

QScrollBar::add-line:vertical {
    background: #444444;
    height: 16px;
    subcontrol-position: bottom;
    subcontrol-origin: margin;
}

QScrollBar::sub-line:vertical {
    background: #444444;
    height: 16px;
    subcontrol-position: top;
    subcontrol-origin: margin;
}

QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
    background: none;
}

QScrollBar:up-arrow:vertical, QScrollBar:down-arrow:vertical {
    border: 2px solid #333333;
    width: 6px;
    height: 6px;
    background: #5f5f5f;
}

/* === QScrollBar:horizontal === */
QScrollBar:horizontal {
    background: #111111;
    height: 16px;
    margin: 0 16px 0 16px;
}

QScrollBar::handle:horizontal {
    background: #555555;
    min-width: 16px;
}

QScrollBar::add-line:horizontal {
    background: #444444;
    width: 16px;
    subcontrol-position: right;
    subcontrol-origin: margin;
}

QScrollBar::sub-line:horizontal {
    background: #444444;
    width: 16px;
    subcontrol-position: left;
    subcontrol-origin: margin;
}

QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
    background: none;
}

QScrollBar:left-arrow:horizontal, QScrollBar:right-arrow:horizontal {
    border: 2px solid #333333;
    width: 6px;
    height: 6px;
    background: #5f5f5f;
}

/* =================== */
QLineEdit, QListView, QTreeView, QTableView, QAbstractSpinBox {
    background-color: black;
    color: #BBBBBB;
    border: 1px solid #333333;
}

QAbstractScrollArea, QLineEdit, QTextEdit, QAbstractSpinBox, QComboBox {
    border-color: #333333;
    border: 1px solid #333333;

}

/* === QHeaderView === */
QHeaderView::section {
    background: #222222;
    border: 0;
    color: #BBBBBB;
    padding: 3px 0 3px 4px;
}

/* === QListView === */
QListView::item:hover {
    background: #333333;
}

QListView::item:selected {
    background: #111111;
    color: yellow;
}

/* === QTableView === */
QTableView::item:hover {
    background: #333333;
}

QTableView::item:hover {
    background: #111111;
    color: yellow;
}

/* === QTreeView === */
QTreeView::item {
    background: black;
}

QTreeView::item:hover {
    background: #333333;
}

QTreeView::item:selected {
    background: #111111;
    color: yellow;
}

QTreeView::branch {

}

QTreeView::branch:has-siblings:adjoins-item {

}

QTreeView::branch:has-siblings:!adjoins-item {

}

QTreeView::branch:closed:has-children:has-siblings {

}

QTreeView::branch:has-children:!has-siblings:closed {

}

QTreeView::branch:!has-children:!has-siblings:adjoins-item {

}

QTreeView::branch:open:has-children:has-siblings {

}

QTreeView::branch:open:has-children:!has-siblings {

}

/* === Customizations === */
QFrame#infoLabel {
    border: 1px inset #333333;
}

2.

.QWidget {
   background-color: beige;
}

QToolBar {
    background-color: beige;
}

QDialog, QFileDialog {
    background-color: beige;
}

QTabWidget::pane { /* The tab widget frame */
    border-top: 2px solid #C2C7CB;
}

QTabWidget::tab-bar {
    left: 5px; /* move to the right by 5px */
}

QTabBar, QTabWidget {
    background-color: beige;
}
QTabBar::tab {
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                 stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
                                 stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
     border: 1px solid darkkhaki;
     border-bottom-color: #C2C7CB; /* same as the pane color */
     border-top-left-radius: 4px;
     border-top-right-radius: 4px;
     min-width: 8ex;
     padding: 2px;
 }
QTabBar::tab:selected, QTabBar::tab:hover {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                stop: 0 #fafafa, stop: 0.4 #f4f4f4,
                                stop: 0.5 #e7e7e7, stop: 1.0 #fafafa);
}

QTabBar::tab:selected {
    border-color: #9B9B9B;
    border-bottom-color: #C2C7CB; /* same as pane color */
}

QTabBar::tab:!selected {
    margin-top: 2px; /* make non-selected tabs look smaller */
}

/* Nice Windows-XP-style password character. */
QLineEdit[echoMode="2"] {
    lineedit-password-character: 9679;
}

QHeaderView::section {
     background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
                                       stop:0 #616161, stop: 0.5 #505050,
                                       stop: 0.6 #434343, stop:1 #656565);
     color: white;
     padding-left: 4px;
     border: 1px solid #6c6c6c;
 }

QHeaderView::section:checked
 {
     background-color: red;
 }

/* We provide a min-width and min-height for push buttons
   so that they look elegant regardless of the width of the text. */
QPushButton {
    background-color: palegoldenrod;
    border-width: 2px;
    border-color: darkkhaki;
    border-style: solid;
    border-radius: 5;
    padding: 3px;
    min-width: 9ex;
    min-height: 2.5ex;
}

QPushButton:hover {
   background-color: khaki;
}

/* Increase the padding, so the text is shifted when the button is
   pressed. */
QPushButton:pressed {
    padding-left: 5px;
    padding-top: 5px;
    background-color: #d0d67c;
}

QLabel, QAbstractButton {
    font: bold;
}

/* Mark mandatory fields with a brownish color. */
.mandatory {
    color: brown;
}

/* Bold text on status bar looks awful. */
QStatusBar QLabel {
   font: normal;
}

QStatusBar::item {
    border-width: 1;
    border-color: darkkhaki;
    border-style: solid;
    border-radius: 2;
}

QStackedWidget, QComboBox, QLineEdit, QSpinBox, QTextEdit, QListView, QWebView, QTreeView, QHeaderView {
    background-color: cornsilk;
    selection-color: #0a214c; 
    selection-background-color: #C19A6B;
}

QListView {
    show-decoration-selected: 1;
}

QListView::item:hover {
    background-color: wheat;
}

/* We reserve 1 pixel space in padding. When we get the focus,
   we kill the padding and enlarge the border. This makes the items
   glow. */
QLineEdit, QFrame {
    border-width: 1px;
    padding: 1px;
    border-style: solid;
    border-color: darkkhaki;
    border-radius: 5px;
}

/* As mentioned above, eliminate the padding and increase the border. */
QLineEdit:focus, QFrame:focus {
    border-width: 3px;
    padding: 0px;
}

/* A QLabel is a QFrame  */
QLabel {
    border: none;
    padding: 0;
    background: none;
}

/* A QToolTip is a QLabel  */
QToolTip {
    border: 2px solid darkkhaki;
    padding: 5px;
    border-radius: 3px;
    opacity: 200;
}

/* Nice to have the background color change when hovered. */
QRadioButton:hover, QCheckBox:hover {
    background-color: wheat;
}

/* Force the dialog's buttons to follow the Windows guidelines. */
QDialogButtonBox {
    button-layout: 0;
}

3.

/*
    Style by evilworks, 2012-2013. pollux@lavabit.com
    This file is Public Domain.
*/

/* === Shared === */
QStackedWidget, QLabel, QPushButton, QRadioButton, QCheckBox, 
QGroupBox, QStatusBar, QToolButton, QComboBox, QDialog, QTabBar {
    font-family: "Segoe UI";
    background-color: #888;
    color: #000;
}

/* === QWidget === */
QWidget:window {
    font-family: 'Segoe UI';
    background-color: #888;
}

/* === QPushButton === */
QPushButton {
    border: 1px solid #555;
    padding: 4px;
    min-width: 65px;
    min-height: 12px;
}

QPushButton:hover {
    background-color: #999;
}

QPushButton:pressed {
    background-color: #333;
    border-color: #555;
    color: #AAA;
}

QPushButton:disabled {
    color: #333333;
}

/* === QComboBox === */
QComboBox {
    background-color: #AAA;
    border: 1px solid #555;
    color: black;
}

QComboBox::drop-down {
    subcontrol-origin: padding;
    subcontrol-position: top right;
    border-left: 1px solid #333333;
}

/* === QGroupBox === */
QGroupBox {
    border: 1px solid #555;
    margin-top: 2ex;
}

QGroupBox::title {
    color: black;
    subcontrol-origin: margin;
    subcontrol-position: top left;    
    border: 1px solid #555;
}

/* === QTabBar === */
QTabBar::tab {
    border-bottom: none;
    color: #000;
    padding: 4px;
    background-color: #888;
    border: 1px solid #555;
}

QTabBar::tab:hover {
    background-color: #AAA;
}

QTabBar::tab:selected {
    background-color: #000;
    color: white;
}

/* === QTabWidget === */
QTabWidget::pane {
    background: #888;
    border: 1px solid #555;
}

/* === QToolBar === */
QToolBar {
    background: #949494;
    border: none;
    padding-left: 0px;
    padding-right: 0px;
    margin: 2px;
}

QToolBar::separator {
    width: 1px;
    margin-left: 3px;
    margin-right: 3px;
    background-color: #555;
}

/* === QToolButton === */
QToolButton {
    border: 1px solid #666;
    margin: 1px;
}

QToolButton:hover {
    background-color: #AAA;
}

QToolButton[popupMode="1"] { /* only for MenuButtonPopup */
    padding-right: 20px; /* make way for the popup button */
}

QToolButton::menu-button {
    border-left: 1px solid #666;
    background: transparent;
    width: 16px;
}

QToolButton::menu-button:hover {
    border-left: 1px solid #666;
    background: transparent;
    width: 16px;
}

QToolButton:checked, QToolButton:pressed {
    background-color: #000;
    border: 1px solid #555;
    color: white;
}

/* === QScrollBar:vertical === */
QScrollBar:vertical {
    width: 16px;
    margin: 16px 0 16px 0;
    background: #333;
}

QScrollBar::handle:vertical {
    background: #888;
    min-height: 16px;
    border-top: 1px solid #666;
    border-bottom: 1px solid #666;
}

QScrollBar::add-line:vertical {
    background: #888;
    height: 16px;
    subcontrol-position: bottom;
    subcontrol-origin: margin;
}

QScrollBar::sub-line:vertical {
    background: #888;
    height: 16px;
    subcontrol-position: top;
    subcontrol-origin: margin;
}

QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
    background: none;
}

/* === QScrollBar:horizontal === */
QScrollBar:horizontal {
    height: 16px;
    margin: 0 16px 0 16px;
    background: #333;
}

QScrollBar::handle:horizontal {
    background: #888;
    min-width: 16px;
    border-left: 1px solid #666;
    border-right: 1px solid #666;
}

QScrollBar::add-line:horizontal {
    background: #888;
    width: 16px;
    subcontrol-position: right;
    subcontrol-origin: margin;
}

QScrollBar::sub-line:horizontal {
    background: #888;
    width: 16px;
    subcontrol-position: left;
    subcontrol-origin: margin;
}

QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
    background: none;
}

/* === QMenu === */
QMenu {
    background-color: black;
    border: 1px solid gray;
    color: white;
    padding: 1px;
}

QMenu::item {
    padding: 2px 25px 2px 20px;
    border: 1px solid transparent;
}

QMenu::item:disabled {
    color: #666666;
}

QMenu::item:selected {
    border-color: gray;
    background: #222222;
}

QMenu::icon:checked {

}

QMenu::separator {
    height: 1px;
    background: #222222;
    margin-left: 10px;
    margin-right: 10px;
    margin-top: 1px;
    margin-bottom: 1px;
}

QMenu::indicator {
    width: 13px;
    height: 13px;
}

/* === QMenuBar === */
QMenuBar {
    background-color: black;
    color: white;
}

QMenuBar::item {
    background: transparent;
}

QMenuBar::item:disabled {
    color: gray;
}

QMenuBar::item:selected {
    background: #222222;
}

QMenuBar::item:pressed {
    background: #444444;
}
/* =================== */
QLineEdit, QListView, QTreeView, QTableView, QAbstractSpinBox {
    background-color: #AAA;
    color: #000;
    border: 1px solid #555;
}

QAbstractScrollArea, QLineEdit, QTextEdit, QAbstractSpinBox, QComboBox {
    border: 1px solid #555;
}

/* === QHeaderView === */
QHeaderView::section {
    height: 20px;
}

QHeaderView::section {
    background: #666;
    border: 0;
    color: #000;
    padding-left: 4px;
}

/* === QListView === */
QListView::item:hover {
    background: #AAA;
}

QListView::item:selected {
    background: #333;
    color: #AAA;
}

/* === QTableView === */
QTableView::item:hover {
    background: #333333;
}

QTableView::item:hover {
    background: #111111;
    color: yellow;
}

/* === QTreeView === */
QTreeView::item {
    background: #AAA;
}

QTreeView::item:hover {
    background: #CCC;
}

QTreeView::item:selected {
    background: #333;
    color: #AAA;
}

QTreeView::branch {

}

QTreeView::branch:has-siblings:adjoins-item {

}

QTreeView::branch:has-siblings:!adjoins-item {

}

QTreeView::branch:closed:has-children:has-siblings {

}

QTreeView::branch:has-children:!has-siblings:closed {

}

QTreeView::branch:!has-children:!has-siblings:adjoins-item {

}

QTreeView::branch:open:has-children:has-siblings {

}

QTreeView::branch:open:has-children:!has-siblings {

}

Qt中漂亮的几款QSS的更多相关文章

  1. Qt 框架的图形性能高(OpenGL上的系统效率高),网络性能低,开发效率高,Quick是可以走硬件加速——Qt中分为好几套图形系统,差不多代表了2D描画的发展史。最经典的软描画系统

    -----图形性能部分-----Qt的widgets部分,运行时的图像渲染性能是一般的,因为大部分的界面内容都是Qt自绘,没有走硬件加速,也就是说很多图形内容都是CPU算出来的.但是widgets底层 ...

  2. QT中设置窗口背景颜色

    QWidget是所有用户界面对象的基类,这意味着可以用同样的方法为其它子类控件改变背景颜色. Qt中窗口背景的设置,下面介绍三种方法. 1.使用QPalette 2.使用Style Sheet 3.绘 ...

  3. Qt中常用知识点

    1:QRegExp 正则表达式 QRegExp regExp("[a-zA-Z][1-9][0-9]{0,2}"); xxx->setValidator(new QRegEx ...

  4. 关于qt中的tr()函数

    关于qt中的tr()函数 在论坛中漂,经常遇到有人遇到tr相关的问题.用tr的有两类人: (1)因为发现中文老出问题,然后搜索,发现很多人用tr,于是他也开始用tr (2)另一类人,确实是出于国际化的 ...

  5. Qt中translate、tr关系 与中文问题

    原文请看:http://hi.baidu.com/dbzhang800/item/d850488767bdc3cdee083d43 题外话:何时使用 tr ? 在论坛中漂,经常遇到有人遇到tr相关的问 ...

  6. C++中的深拷贝和浅拷贝 QT中的深拷贝,浅拷贝和隐式共享

    下面是C++中定义的深,浅拷贝 当用一个已初始化过了的自定义类类型对象去初始化另一个新构造的对象的时候,拷贝构造函数就会被自动调用.也就是说,当类的对象需要拷贝时,拷贝构造函数将会被调用.以下情况都会 ...

  7. Qt样式表之二:QSS语法及常用样式

    一.简述 Qt样式表(以下统称QSS)的术语和语法规则几乎和CSS相同.如果你熟悉CSS,可以快速浏览以下内容.不熟悉的话可以先去W3School - CSS或者本人的CSS博客随笔简单了解一下. 在 ...

  8. 使用CEF(四)— 在QT中集成CEF(1):基本集成

    QT作为C++下著名的跨平台软件开发框架,实现了一套代码可以在所有的操作系统.平台和屏幕类型上部署.我们前几篇文章讲解了如何构建一款基于CEF的简单的样例,但这些样例的GUI都是使用的原生的或者是控件 ...

  9. Qt 中使用Singleton模式需小心

    在qt中,使用Singleton模式时一定要小心.因为Singleton模式中使用的是静态对象,静态对象是直到程序结束才被释放的,然而,一旦把该静态对象纳入了Qt的父子对象体系,就会导致不明确的行为. ...

随机推荐

  1. springmvc通过ajax异步请求返回json格式数据

    jsp 首先创建index.jsp页面 <script type="text/javascript"> $(function () { $("#usernam ...

  2. iPhone 尺寸 iPhonex

    http://tool.lanrentuku.com/guifan/ui.html 这是本人复制的链接,,如有不适用,,请;联系本人删除链接,,谢谢. iPhone x尺寸 1125x2436@3x ...

  3. 【Python】【IO】

    # [[IO]] # [文件读写] '''读写文件是最常见的IO操作.Python内置了读写文件的函数,用法和C是兼容的.读写文件前,我们先必须了解一下,在磁盘上读写文件的功能都是由操作系统提供的,现 ...

  4. jsp导入数据库数据写法(模板)

    1.导入表格模板 <%@ page language="java" contentType="text/html; charset=utf-8" page ...

  5. C++.sprintf

    ZC:sprintf,sprintf_s 1.经测试 sprintf,是会在字符串的最后 加上'\0'的,∴ 不用担心 字符串的结尾的问题 2. 3. 4. 5.

  6. 关于AutoMApping 实体映射

    安装AutoMapping包 把订单实体映射成订单DTO实体 .ReverseMap()加上这个方法后 下面自定义 映射规则  第一个就是来源对象 第二个就是目标对象 https://www.cnbl ...

  7. 大话WebRTC的前世今生

    音视频的历史 音视频可以说是人类与生俱来的需求,人一出生就要用耳朵听,用眼睛看.中国的古代神话中为此还专门设置了两位神仙(千里眼和顺风耳),他们可以听到或看到千里之外的声音或景像. 为了解决听的远和看 ...

  8. mint 安装过程

    这几天因为各种原因装系统(自己因为双屏不能旋转,输入法界面始终矬,重装2次(应该都是更新内核和更新时包依赖不对的锅,以后屏蔽内核更新和linux-libc-dev这样的更新,要么就新版本出来重装),和 ...

  9. Python&HDF5目录

    最近一直没更新python&量化的博客,是因为忙于看HDF5的书,写VNPY框架,学scrapy爬虫. 本来写博客的目的就是为了当作一种教材,当遇到不会的问题过来找答案. 对于HDF5下面这本 ...

  10. 日常英语---十四、Dolce & Gabbana cancels China show amid 'racist' ad controversy(adj.温柔的,prep.在其中)

    日常英语---十四.Dolce & Gabbana cancels China show amid 'racist' ad controversy(adj.温柔的,prep.在其中) 一.总结 ...