使用方式如下

    //设置皮肤样式
    static void SetStyle(const QString &styleName)
    {
        QFile file(QString(":/image/%1.css").arg(styleName));
        file.open(QFile::ReadOnly);
        QString qss = QLatin1String(file.readAll());
        qApp->setStyleSheet(qss);
        qApp->setPalette(QPalette(QColor("#F0F0F0")));
    }

参考http://blog.163.com/qimo601@126/blog/static/158220932016311521278/
TestGUI下载

黑色皮肤效果如图

黑色皮肤

QWidget#frmLogin,QWidget#frmPopup,QWidget#frmHostInfo,QWidget#frmLogout,QWidget#frmConfig,QWidget#frmData,QWidget#frmDefence,QWidget#frmHost,QWidget#frmMain,QWidget#frmPwd,QWidget#frmSelect,QWidget#frmMessageBox{
    border:1px solid #4D4D4D;
    border-radius:0px;
}

.QFrame{
    border:1px solid #636363;
    border-radius:5px;
}

QWidget#widget_title{
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #4D4D4D, stop:1 #292929);
}

QLabel#lab_Ico,QLabel#lab_Title{
    border-radius:0px;
    color: #F0F0F0;
    background-color:rgba(0,0,0,0);
    border-style:none;
}

QLineEdit {
    border: 1px solid #636363;
    border-radius: 5px;
    padding: 2px;
    background: none;
    selection-background-color: #4D4D4D;
}

QLineEdit[echoMode="2"] {
    lineedit-password-character: 9679;
}

.QGroupBox{
    border: 1px solid #636363;
    border-radius: 5px;
}

.QPushButton{
    border-style: none;
    border: 0px;
    color: #F0F0F0;
    padding: 5px;
    min-height: 20px;
    border-radius:5px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #4D4D4D, stop:1 #292929);
}

.QPushButton[focusPolicy="0"] {
    border-style: none;
    border: 0px;
    color: #F0F0F0;
    padding: 0px;
    min-height: 10px;
    border-radius:3px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #4D4D4D, stop:1 #292929);
}

.QPushButton:hover{
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #636363, stop:1 #575757);
}

.QPushButton:pressed{
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #4D4D4D, stop:1 #292929);
}

QPushButton#btnMenu,QPushButton#btnMenu_Min,QPushButton#btnMenu_Max,QPushButton#btnMenu_Close{
    border-radius:0px;
    color: #F0F0F0;
    background-color:rgba(0,0,0,0);
    border-style:none;
}

QPushButton#btnMenu:hover,QPushButton#btnMenu_Min:hover,QPushButton#btnMenu_Max:hover{
    background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(25, 134, 199, 0), stop:1 #636363);
}

QPushButton#btnMenu_Close:hover{
    background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(238, 0, 0, 128), stop:1 rgba(238, 44, 44, 255));
}

QCheckBox {
    spacing: 2px;
}

QCheckBox::indicator {
    width: 20px;
    height: 20px;
}

QCheckBox::indicator:unchecked {
    image: url(:/image/checkbox_unchecked.png);
}

QCheckBox::indicator:checked {
    image: url(:/image/checkbox_checked.png);
}

QRadioButton {
    spacing: 2px;
}

QRadioButton::indicator {
    width: 15px;
    height: 15px;
}

QRadioButton::indicator::unchecked {
    image: url(:/image/radio_normal.png);
}

QRadioButton::indicator::checked {
    image: url(:/image/radio_selected.png);
}

QComboBox,QDateEdit{
    border-radius: 3px;
    padding: 1px 10px 1px 5px;
    border: 1px solid #636363;
}

QComboBox::drop-down,QDateEdit::drop-down {
    subcontrol-origin: padding;
    subcontrol-position: top right;
    width: 15px;
    border-left-width: 1px;
    border-left-style: solid;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    border-left-color: #636363;
}

QComboBox::down-arrow,QDateEdit::down-arrow {
    image: url(:/image/array_down.png);
}

QMenu {
    background-color:#F0F0F0;
    margin: 2px;
}

QMenu::item {
    padding: 2px 12px 2px 12px;
}

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

QMenu::item:selected {
    color: #F0F0F0;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #4D4D4D, stop:1 #292929);
}

QMenu::separator {
    height: 1px;
    background: #636363;
}

QProgressBar {
    border-radius: 5px;
    text-align: center;
    border: 1px solid #636363;
}

QProgressBar::chunk {
    width: 5px;
    margin: 0.5px;
    background-color: #4D4D4D;
}

QSlider::groove:horizontal,QSlider::add-page:horizontal {
    background: #808080;
    height: 8px;
    border-radius: 3px;
}

QSlider::sub-page:horizontal {
    height: 8px;
    border-radius: 3px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #4D4D4D, stop:1 #292929);
}

QSlider::handle:horizontal {
    width: 13px;
    margin-top: -3px;
    margin-bottom: -3px;
    border-radius: 6px;
    background: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5,stop:0.6 #F0F0F0, stop:0.778409 #636363);
}

QSlider::handle:horizontal:hover {
    background: qradialgradient(spread: pad, cx: 0.5, cy: 0.5, radius: 0.5, fx: 0.5, fy: 0.5, stop: 0.6 #F0F0F0,stop:0.778409 #4D4D4D);
}

QSlider::groove:vertical,QSlider::sub-page:vertical {
    background:#808080;
    width: 8px;
    border-radius: 3px;
}

QSlider::add-page:vertical {
    width: 8px;
    border-radius: 3px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #4D4D4D, stop:1 #292929);
}

QSlider::handle:vertical {
    height: 14px;
    margin-left: -3px;
    margin-right: -3px;
    border-radius: 6px;
    background: qradialgradient(spread: pad, cx: 0.5, cy: 0.5, radius: 0.5, fx: 0.5, fy: 0.5, stop: 0.6 #F0F0F0, stop:0.778409 #636363);
}

QSlider::handle:vertical:hover {
    background: qradialgradient(spread: pad, cx: 0.5, cy: 0.5, radius: 0.5, fx: 0.5, fy: 0.5, stop: 0.6 #F0F0F0,stop:0.778409 #4D4D4D);
}

QScrollBar:vertical {
    width:10px;
    background-color:rgba(0,0,0,0%);
    padding-top:10px;
    padding-bottom:10px;
}

QScrollBar:horizontal {
    height:10px;
    background-color:rgba(0,0,0,0%);
    padding-left:10px; padding-right:10px;
}

QScrollBar::handle:vertical {
    width:10px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #636363, stop:1 #575757);
}

QScrollBar::handle:horizontal {
    height:10px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #636363, stop:1 #575757);
}

QScrollBar::handle:vertical:hover {
    width:10px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #4D4D4D, stop:1 #292929);
}

QScrollBar::handle:horizontal:hover {
    height:10px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #4D4D4D, stop:1 #292929);
}

QScrollBar::add-line:vertical {
    height:10px;
    width:10px;
    subcontrol-position: bottom;
    subcontrol-origin: margin;
    border-image:url(:/image/add-line_vertical.png);
}

QScrollBar::add-line:horizontal {
    height:10px;
    width:10px;
    subcontrol-position: right;
    subcontrol-origin: margin;
    border-image:url(:/image/add-line_horizontal.png);
}

QScrollBar::sub-line:vertical {
    height:10px;
    width:10px;
    subcontrol-position: top;
    subcontrol-origin: margin;
    border-image:url(:/image/sub-line_vertical.png);
}

QScrollBar::sub-line:horizontal {
    height:10px;
    width:10px;
    subcontrol-position: left;
    subcontrol-origin: margin;
    border-image:url(:/image/sub-line_horizontal.png);
}

QScrollBar::add-page:vertical,QScrollBar::sub-page:vertical {
    width:10px;
    background: #C0C0C0;
}

QScrollBar::add-page:horizontal,QScrollBar::sub-page:horizontal {
    height:10px;
    background: #C0C0C0;
}

QScrollArea {
    border: 0px ;
}

QTreeView,QListView,QTableView{
    border: 1px solid #636363;
    selection-background-color: #4D4D4D;
    selection-color: #F0F0F0;
}

QTableView::item:selected, QListView::item:selected, QTreeView::item:selected {
    color: #F0F0F0;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #4D4D4D, stop:1 #292929);
}

QTableView::item:hover, QListView::item:hover, QTreeView::item:hover {
    color: #F0F0F0;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #636363, stop:1 #575757);
}

QTableView::item, QListView::item, QTreeView::item {
    padding: 5px;
    margin: 0px;
}

QHeaderView::section {
    padding:3px;
    margin:0px;
    color:#F0F0F0;
    border: 1px solid #F0F0F0;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #636363, stop:1 #575757);
}

QTabBar::tab {
    border-bottom-left-radius:0px;
    border-bottom-right-radius:0px;
    color: #F0F0F0;
    min-width: 60px;
    min-height: 20px;
    padding: 3px 8px 3px 8px;
    margin:1px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #636363, stop:1 #575757);
}

QTabBar::tab:selected, QTabBar::tab:hover {
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #4D4D4D, stop:1 #292929);
}

QStatusBar::item {
     border: 1px solid #636363;
     border-radius: 3px;
}

蓝色皮肤

QWidget#frmLogin,QWidget#frmPopup,QWidget#frmHostInfo,QWidget#frmLogout,QWidget#frmConfig,QWidget#frmData,QWidget#frmDefence,QWidget#frmHost,QWidget#frmMain,QWidget#frmPwd,QWidget#frmSelect,QWidget#frmMessageBox{
    border:1px solid #1B89CA;
    border-radius:0px;
}

.QFrame{
    border:1px solid #5CACEE;
    border-radius:5px;
}

QWidget#widget_title{
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5);
}

QLabel#lab_Ico,QLabel#lab_Title{
    border-radius:0px;
    color: #F0F0F0;
    background-color:rgba(0,0,0,0);
    border-style:none;
}

QLineEdit {
    border: 1px solid #5CACEE;
    border-radius: 5px;
    padding: 2px;
    background: none;
    selection-background-color: #1B89CA;
}

QLineEdit[echoMode="2"] {
    lineedit-password-character: 9679;
}

.QGroupBox{
    border: 1px solid #5CACEE;
    border-radius: 5px;
}

.QPushButton{
    border-style: none;
    border: 0px;
    color: #F0F0F0;
    padding: 5px;
    min-height: 20px;
    border-radius:5px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5);
}

.QPushButton[focusPolicy="0"] {
    border-style: none;
    border: 0px;
    color: #F0F0F0;
    padding: 0px;
    min-height: 10px;
    border-radius:3px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5);
}

.QPushButton:hover{
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #5CACEE, stop:1 #4F94CD);
}

.QPushButton:pressed{
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5);
}

QPushButton#btnMenu,QPushButton#btnMenu_Min,QPushButton#btnMenu_Max,QPushButton#btnMenu_Close{
    border-radius:0px;
    color: #F0F0F0;
    background-color:rgba(0,0,0,0);
    border-style:none;
}

QPushButton#btnMenu:hover,QPushButton#btnMenu_Min:hover,QPushButton#btnMenu_Max:hover{
    background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(25, 134, 199, 0), stop:1 #5CACEE);
}

QPushButton#btnMenu_Close:hover{
    background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(238, 0, 0, 128), stop:1 rgba(238, 44, 44, 255));
}

QCheckBox {
    spacing: 2px;
}

QCheckBox::indicator {
    width: 20px;
    height: 20px;
}

QCheckBox::indicator:unchecked {
    image: url(:/image/checkbox_unchecked.png);
}

QCheckBox::indicator:checked {
    image: url(:/image/checkbox_checked.png);
}

QRadioButton {
    spacing: 2px;
}

QRadioButton::indicator {
    width: 15px;
    height: 15px;
}

QRadioButton::indicator::unchecked {
    image: url(:/image/radio_normal.png);
}

QRadioButton::indicator::checked {
    image: url(:/image/radio_selected.png);
}

QComboBox,QDateEdit{
    border-radius: 3px;
    padding: 1px 10px 1px 5px;
    border: 1px solid #5CACEE;
}

QComboBox::drop-down,QDateEdit::drop-down {
    subcontrol-origin: padding;
    subcontrol-position: top right;
    width: 15px;
    border-left-width: 1px;
    border-left-style: solid;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    border-left-color: #5CACEE;
}

QComboBox::down-arrow,QDateEdit::down-arrow {
    image: url(:/image/array_down.png);
}

QMenu {
    background-color:#F0F0F0;
    margin: 2px;
}

QMenu::item {
    padding: 2px 12px 2px 12px;
}

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

QMenu::item:selected {
    color: #FFFFFF;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5);
}

QMenu::separator {
    height: 1px;
    background: #5CACEE;
}

QProgressBar {
    border-radius: 5px;
    text-align: center;
    border: 1px solid #5CACEE;
}

QProgressBar::chunk {
    width: 5px;
    margin: 0.5px;
    background-color: #1B89CA;
}

QSlider::groove:horizontal,QSlider::add-page:horizontal {
    background: #808080;
    height: 8px;
    border-radius: 3px;
}

QSlider::sub-page:horizontal {
    height: 8px;
    border-radius: 3px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5);
}

QSlider::handle:horizontal {
    width: 13px;
    margin-top: -3px;
    margin-bottom: -3px;
    border-radius: 6px;
    background: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5,stop:0.6 #F0F0F0, stop:0.778409 #5CACEE);
}

QSlider::handle:horizontal:hover {
    background: qradialgradient(spread: pad, cx: 0.5, cy: 0.5, radius: 0.5, fx: 0.5, fy: 0.5, stop: 0.6 #F0F0F0,stop:0.778409 #1B89CA);
}

QSlider::groove:vertical,QSlider::sub-page:vertical {
    background:#808080;
    width: 8px;
    border-radius: 3px;
}

QSlider::add-page:vertical {
    width: 8px;
    border-radius: 3px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5);
}

QSlider::handle:vertical {
    height: 14px;
    margin-left: -3px;
    margin-right: -3px;
    border-radius: 6px;
    background: qradialgradient(spread: pad, cx: 0.5, cy: 0.5, radius: 0.5, fx: 0.5, fy: 0.5, stop: 0.6 #F0F0F0, stop:0.778409 #5CACEE);
}

QSlider::handle:vertical:hover {
    background: qradialgradient(spread: pad, cx: 0.5, cy: 0.5, radius: 0.5, fx: 0.5, fy: 0.5, stop: 0.6 #F0F0F0,stop:0.778409 #1B89CA);
}

QScrollBar:vertical {
    width:10px;
    background-color:rgba(0,0,0,0%);
    padding-top:10px;
    padding-bottom:10px;
}

QScrollBar:horizontal {
    height:10px;
    background-color:rgba(0,0,0,0%);
    padding-left:10px; padding-right:10px;
}

QScrollBar::handle:vertical {
    width:10px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #5CACEE, stop:1 #4F94CD);
}

QScrollBar::handle:horizontal {
    height:10px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #5CACEE, stop:1 #4F94CD);
}

QScrollBar::handle:vertical:hover {
    width:10px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5);
}

QScrollBar::handle:horizontal:hover {
    height:10px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5);
}

QScrollBar::add-line:vertical {
    height:10px;
    width:10px;
    subcontrol-position: bottom;
    subcontrol-origin: margin;
    border-image:url(:/image/add-line_vertical.png);
}

QScrollBar::add-line:horizontal {
    height:10px;
    width:10px;
    subcontrol-position: right;
    subcontrol-origin: margin;
    border-image:url(:/image/add-line_horizontal.png);
}

QScrollBar::sub-line:vertical {
    height:10px;
    width:10px;
    subcontrol-position: top;
    subcontrol-origin: margin;
    border-image:url(:/image/sub-line_vertical.png);
}

QScrollBar::sub-line:horizontal {
    height:10px;
    width:10px;
    subcontrol-position: left;
    subcontrol-origin: margin;
    border-image:url(:/image/sub-line_horizontal.png);
}

QScrollBar::add-page:vertical,QScrollBar::sub-page:vertical {
    width:10px;
    background: #C0C0C0;
}

QScrollBar::add-page:horizontal,QScrollBar::sub-page:horizontal {
    height:10px;
    background: #C0C0C0;
}

QScrollArea {
    border: 0px ;
}

QTreeView,QListView,QTableView{
    border: 1px solid #5CACEE;
    selection-background-color: #1B89CA;
    selection-color: #F0F0F0;
}

QTableView::item:selected, QListView::item:selected, QTreeView::item:selected {
    color: #F0F0F0;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5);
}

QTableView::item:hover, QListView::item:hover, QTreeView::item:hover {
    color: #F0F0F0;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #5CACEE, stop:1 #4F94CD);
}

QTableView::item, QListView::item, QTreeView::item {
    padding: 5px;
    margin: 0px;
}

QHeaderView::section {
    padding:3px;
    margin:0px;
    color:#F0F0F0;
    border: 1px solid #F0F0F0;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #5CACEE, stop:1 #4F94CD);
}

QTabBar::tab {
    border-bottom-left-radius:0px;
    border-bottom-right-radius:0px;
    color: #F0F0F0;
    min-width: 60px;
    min-height: 20px;
    padding: 3px 8px 3px 8px;
    margin:1px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #5CACEE, stop:1 #4F94CD);
}

QTabBar::tab:selected, QTabBar::tab:hover {
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5);
}

QStatusBar::item {
     border: 1px solid #5CACEE;
     border-radius: 3px;
}

灰色皮肤

QWidget#frmLogin,QWidget#frmPopup,QWidget#frmHostInfo,QWidget#frmLogout,QWidget#frmConfig,QWidget#frmData,QWidget#frmDefence,QWidget#frmHost,QWidget#frmMain,QWidget#frmPwd,QWidget#frmSelect,QWidget#frmMessageBox{
    border:1px solid #454648;
    border-radius:0px;
}

.QFrame{
    border:1px solid #B8B8B8;
    border-radius:5px;
}

QWidget#widget_title{
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #454648, stop:1 #7A7A7A);
}

QLabel#lab_Ico,QLabel#lab_Title{
    border-radius:0px;
    color: #F0F0F0;
    background-color:rgba(0,0,0,0);
    border-style:none;
}

QLineEdit {
    border: 1px solid #B8B8B8;
    border-radius: 5px;
    padding: 2px;
    background: none;
    selection-background-color: #454648;
}

QLineEdit[echoMode="2"] {
    lineedit-password-character: 9679;
}

.QGroupBox{
    border: 1px solid #B8B8B8;
    border-radius: 5px;
}

.QPushButton{
    border-style: none;
    border: 0px;
    color: #F0F0F0;
    padding: 5px;
    min-height: 20px;
    border-radius:5px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #454648, stop:1 #7A7A7A);
}

.QPushButton[focusPolicy="0"] {
    border-style: none;
    border: 0px;
    color: #F0F0F0;
    padding: 0px;
    min-height: 10px;
    border-radius:3px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #454648, stop:1 #7A7A7A);
}

.QPushButton:hover{
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #B8B8B8, stop:1 #D6D6D6);
}

.QPushButton:pressed{
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #454648, stop:1 #7A7A7A);
}

QPushButton#btnMenu,QPushButton#btnMenu_Min,QPushButton#btnMenu_Max,QPushButton#btnMenu_Close{
    border-radius:0px;
    color: #F0F0F0;
    background-color:rgba(0,0,0,0);
    border-style:none;
}

QPushButton#btnMenu:hover,QPushButton#btnMenu_Min:hover,QPushButton#btnMenu_Max:hover{
    background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(25, 134, 199, 0), stop:1 #B8B8B8);
}

QPushButton#btnMenu_Close:hover{
    background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(238, 0, 0, 128), stop:1 rgba(238, 44, 44, 255));
}

QCheckBox {
    spacing: 2px;
}

QCheckBox::indicator {
    width: 20px;
    height: 20px;
}

QCheckBox::indicator:unchecked {
    image: url(:/image/checkbox_unchecked.png);
}

QCheckBox::indicator:checked {
    image: url(:/image/checkbox_checked.png);
}

QRadioButton {
    spacing: 2px;
}

QRadioButton::indicator {
    width: 15px;
    height: 15px;
}

QRadioButton::indicator::unchecked {
    image: url(:/image/radio_normal.png);
}

QRadioButton::indicator::checked {
    image: url(:/image/radio_selected.png);
}

QComboBox,QDateEdit{
    border-radius: 3px;
    padding: 1px 10px 1px 5px;
    border: 1px solid #B8B8B8;
}

QComboBox::drop-down,QDateEdit::drop-down {
    subcontrol-origin: padding;
    subcontrol-position: top right;
    width: 15px;
    border-left-width: 1px;
    border-left-style: solid;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    border-left-color: #B8B8B8;
}

QComboBox::down-arrow,QDateEdit::down-arrow {
    image: url(:/image/array_down.png);
}

QMenu {
    background-color:#F0F0F0;
    margin: 2px;
}

QMenu::item {
    padding: 2px 12px 2px 12px;
}

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

QMenu::item:selected {
    color: #F0F0F0;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #454648, stop:1 #7A7A7A);
}

QMenu::separator {
    height: 1px;
    background: #B8B8B8;
}

QProgressBar {
    border-radius: 5px;
    text-align: center;
    border: 1px solid #B8B8B8;
}

QProgressBar::chunk {
    width: 5px;
    margin: 0.5px;
    background-color: #454648;
}

QSlider::groove:horizontal,QSlider::add-page:horizontal {
    background: #808080;
    height: 8px;
    border-radius: 3px;
}

QSlider::sub-page:horizontal {
    height: 8px;
    border-radius: 3px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #454648, stop:1 #7A7A7A);
}

QSlider::handle:horizontal {
    width: 13px;
    margin-top: -3px;
    margin-bottom: -3px;
    border-radius: 6px;
    background: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5,stop:0.6 #F0F0F0, stop:0.778409 #B8B8B8);
}

QSlider::handle:horizontal:hover {
    background: qradialgradient(spread: pad, cx: 0.5, cy: 0.5, radius: 0.5, fx: 0.5, fy: 0.5, stop: 0.6 #F0F0F0,stop:0.778409 #454648);
}

QSlider::groove:vertical,QSlider::sub-page:vertical {
    background:#808080;
    width: 8px;
    border-radius: 3px;
}

QSlider::add-page:vertical {
    width: 8px;
    border-radius: 3px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #454648, stop:1 #7A7A7A);
}

QSlider::handle:vertical {
    height: 14px;
    margin-left: -3px;
    margin-right: -3px;
    border-radius: 6px;
    background: qradialgradient(spread: pad, cx: 0.5, cy: 0.5, radius: 0.5, fx: 0.5, fy: 0.5, stop: 0.6 #F0F0F0, stop:0.778409 #B8B8B8);
}

QSlider::handle:vertical:hover {
    background: qradialgradient(spread: pad, cx: 0.5, cy: 0.5, radius: 0.5, fx: 0.5, fy: 0.5, stop: 0.6 #F0F0F0,stop:0.778409 #454648);
}

QScrollBar:vertical {
    width:10px;
    background-color:rgba(0,0,0,0%);
    padding-top:10px;
    padding-bottom:10px;
}

QScrollBar:horizontal {
    height:10px;
    background-color:rgba(0,0,0,0%);
    padding-left:10px; padding-right:10px;
}

QScrollBar::handle:vertical {
    width:10px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #B8B8B8, stop:1 #D6D6D6);
}

QScrollBar::handle:horizontal {
    height:10px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #B8B8B8, stop:1 #D6D6D6);
}

QScrollBar::handle:vertical:hover {
    width:10px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #454648, stop:1 #7A7A7A);
}

QScrollBar::handle:horizontal:hover {
    height:10px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #454648, stop:1 #7A7A7A);
}

QScrollBar::add-line:vertical {
    height:10px;
    width:10px;
    subcontrol-position: bottom;
    subcontrol-origin: margin;
    border-image:url(:/image/add-line_vertical.png);
}

QScrollBar::add-line:horizontal {
    height:10px;
    width:10px;
    subcontrol-position: right;
    subcontrol-origin: margin;
    border-image:url(:/image/add-line_horizontal.png);
}

QScrollBar::sub-line:vertical {
    height:10px;
    width:10px;
    subcontrol-position: top;
    subcontrol-origin: margin;
    border-image:url(:/image/sub-line_vertical.png);
}

QScrollBar::sub-line:horizontal {
    height:10px;
    width:10px;
    subcontrol-position: left;
    subcontrol-origin: margin;
    border-image:url(:/image/sub-line_horizontal.png);
}

QScrollBar::add-page:vertical,QScrollBar::sub-page:vertical {
    width:10px;
    background: #C0C0C0;
}

QScrollBar::add-page:horizontal,QScrollBar::sub-page:horizontal {
    height:10px;
    background: #C0C0C0;
}

QScrollArea {
    border: 0px ;
}

QTreeView,QListView,QTableView{
    border: 1px solid #B8B8B8;
    selection-background-color: #454648;
    selection-color: #F0F0F0;
}

QTableView::item:selected, QListView::item:selected, QTreeView::item:selected {
    color: #F0F0F0;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #454648, stop:1 #7A7A7A);
}

QTableView::item:hover, QListView::item:hover, QTreeView::item:hover {
    color: #F0F0F0;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #B8B8B8, stop:1 #D6D6D6);
}

QTableView::item, QListView::item, QTreeView::item {
    padding: 5px;
    margin: 0px;
}

QHeaderView::section {
    padding:3px;
    margin:0px;
    color:#F0F0F0;
    border: 1px solid #F0F0F0;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #B8B8B8, stop:1 #D6D6D6);
}

QTabBar::tab {
    border-bottom-left-radius:0px;
    border-bottom-right-radius:0px;
    color: #F0F0F0;
    min-width: 60px;
    min-height: 20px;
    padding: 3px 8px 3px 8px;
    margin:1px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #B8B8B8, stop:1 #D6D6D6);
}

QTabBar::tab:selected, QTabBar::tab:hover {
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #454648, stop:1 #7A7A7A);
}

QStatusBar::item {
     border: 1px solid #B8B8B8;
     border-radius: 3px;
}

海军蓝色皮肤

QWidget#frmLogin,QWidget#frmPopup,QWidget#frmHostInfo,QWidget#frmLogout,QWidget#frmConfig,QWidget#frmData,QWidget#frmDefence,QWidget#frmHost,QWidget#frmMain,QWidget#frmPwd,QWidget#frmSelect,QWidget#frmMessageBox{
    border:1px solid #0F7DBE;
    border-radius:0px;
}

.QFrame{
    border:1px solid #50A3F0;
    border-radius:5px;
}

QWidget#widget_title{
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #0F7DBE, stop:1 #1582C3);
}

QLabel#lab_Ico,QLabel#lab_Title{
    border-radius:0px;
    color: #F0F0F0;
    background-color:rgba(0,0,0,0);
    border-style:none;
}

QLineEdit {
    border: 1px solid #50A3F0;
    border-radius: 5px;
    padding: 2px;
    background: none;
    selection-background-color: #0F7DBE;
}

QLineEdit[echoMode="2"] {
    lineedit-password-character: 9679;
}

.QGroupBox{
    border: 1px solid #50A3F0;
    border-radius: 5px;
}

.QPushButton{
    border-style: none;
    border: 0px;
    color: #F0F0F0;
    padding: 5px;
    min-height: 20px;
    border-radius:5px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #0F7DBE, stop:1 #1582C3);
}

.QPushButton[focusPolicy="0"] {
    border-style: none;
    border: 0px;
    color: #F0F0F0;
    padding: 0px;
    min-height: 10px;
    border-radius:3px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #0F7DBE, stop:1 #1582C3);
}

.QPushButton:hover{
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #50A3F0, stop:1 #489CEA);
}

.QPushButton:pressed{
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #0F7DBE, stop:1 #1582C3);
}

QPushButton#btnMenu,QPushButton#btnMenu_Min,QPushButton#btnMenu_Max,QPushButton#btnMenu_Close{
    border-radius:0px;
    color: #F0F0F0;
    background-color:rgba(0,0,0,0);
    border-style:none;
}

QPushButton#btnMenu:hover,QPushButton#btnMenu_Min:hover,QPushButton#btnMenu_Max:hover{
    background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(25, 134, 199, 0), stop:1 #50A3F0);
}

QPushButton#btnMenu_Close:hover{
    background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(238, 0, 0, 128), stop:1 rgba(238, 44, 44, 255));
}

QCheckBox {
    spacing: 2px;
}

QCheckBox::indicator {
    width: 20px;
    height: 20px;
}

QCheckBox::indicator:unchecked {
    image: url(:/image/checkbox_unchecked.png);
}

QCheckBox::indicator:checked {
    image: url(:/image/checkbox_checked.png);
}

QRadioButton {
    spacing: 2px;
}

QRadioButton::indicator {
    width: 15px;
    height: 15px;
}

QRadioButton::indicator::unchecked {
    image: url(:/image/radio_normal.png);
}

QRadioButton::indicator::checked {
    image: url(:/image/radio_selected.png);
}

QComboBox,QDateEdit{
    border-radius: 3px;
    padding: 1px 10px 1px 5px;
    border: 1px solid #50A3F0;
}

QComboBox::drop-down,QDateEdit::drop-down {
    subcontrol-origin: padding;
    subcontrol-position: top right;
    width: 15px;
    border-left-width: 1px;
    border-left-style: solid;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    border-left-color: #50A3F0;
}

QComboBox::down-arrow,QDateEdit::down-arrow {
    image: url(:/image/array_down.png);
}

QMenu {
    background-color:#F0F0F0;
    margin: 2px;
}

QMenu::item {
    padding: 2px 12px 2px 12px;
}

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

QMenu::item:selected {
    color: #F0F0F0;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #0F7DBE, stop:1 #1582C3);
}

QMenu::separator {
    height: 1px;
    background: #50A3F0;
}

QProgressBar {
    border-radius: 5px;
    text-align: center;
    border: 1px solid #50A3F0;
}

QProgressBar::chunk {
    width: 5px;
    margin: 0.5px;
    background-color: #0F7DBE;
}

QSlider::groove:horizontal,QSlider::add-page:horizontal {
    background: #808080;
    height: 8px;
    border-radius: 3px;
}

QSlider::sub-page:horizontal {
    height: 8px;
    border-radius: 3px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #0F7DBE, stop:1 #1582C3);
}

QSlider::handle:horizontal {
    width: 13px;
    margin-top: -3px;
    margin-bottom: -3px;
    border-radius: 6px;
    background: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5,stop:0.6 #F0F0F0, stop:0.778409 #50A3F0);
}

QSlider::handle:horizontal:hover {
    background: qradialgradient(spread: pad, cx: 0.5, cy: 0.5, radius: 0.5, fx: 0.5, fy: 0.5, stop: 0.6 #F0F0F0,stop:0.778409 #0F7DBE);
}

QSlider::groove:vertical,QSlider::sub-page:vertical {
    background:#808080;
    width: 8px;
    border-radius: 3px;
}

QSlider::add-page:vertical {
    width: 8px;
    border-radius: 3px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #0F7DBE, stop:1 #1582C3);
}

QSlider::handle:vertical {
    height: 14px;
    margin-left: -3px;
    margin-right: -3px;
    border-radius: 6px;
    background: qradialgradient(spread: pad, cx: 0.5, cy: 0.5, radius: 0.5, fx: 0.5, fy: 0.5, stop: 0.6 #F0F0F0, stop:0.778409 #50A3F0);
}

QSlider::handle:vertical:hover {
    background: qradialgradient(spread: pad, cx: 0.5, cy: 0.5, radius: 0.5, fx: 0.5, fy: 0.5, stop: 0.6 #F0F0F0,stop:0.778409 #0F7DBE);
}

QScrollBar:vertical {
    width:10px;
    background-color:rgba(0,0,0,0%);
    padding-top:10px;
    padding-bottom:10px;
}

QScrollBar:horizontal {
    height:10px;
    background-color:rgba(0,0,0,0%);
    padding-left:10px; padding-right:10px;
}

QScrollBar::handle:vertical {
    width:10px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #50A3F0, stop:1 #489CEA);
}

QScrollBar::handle:horizontal {
    height:10px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #50A3F0, stop:1 #489CEA);
}

QScrollBar::handle:vertical:hover {
    width:10px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #0F7DBE, stop:1 #1582C3);
}

QScrollBar::handle:horizontal:hover {
    height:10px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #0F7DBE, stop:1 #1582C3);
}

QScrollBar::add-line:vertical {
    height:10px;
    width:10px;
    subcontrol-position: bottom;
    subcontrol-origin: margin;
    border-image:url(:/image/add-line_vertical.png);
}

QScrollBar::add-line:horizontal {
    height:10px;
    width:10px;
    subcontrol-position: right;
    subcontrol-origin: margin;
    border-image:url(:/image/add-line_horizontal.png);
}

QScrollBar::sub-line:vertical {
    height:10px;
    width:10px;
    subcontrol-position: top;
    subcontrol-origin: margin;
    border-image:url(:/image/sub-line_vertical.png);
}

QScrollBar::sub-line:horizontal {
    height:10px;
    width:10px;
    subcontrol-position: left;
    subcontrol-origin: margin;
    border-image:url(:/image/sub-line_horizontal.png);
}

QScrollBar::add-page:vertical,QScrollBar::sub-page:vertical {
    width:10px;
    background: #C0C0C0;
}

QScrollBar::add-page:horizontal,QScrollBar::sub-page:horizontal {
    height:10px;
    background: #C0C0C0;
}

QScrollArea {
    border: 0px ;
}

QTreeView,QListView,QTableView{
    border: 1px solid #50A3F0;
    selection-background-color: #0F7DBE;
    selection-color: #F0F0F0;
}

QTableView::item:selected, QListView::item:selected, QTreeView::item:selected {
    color: #F0F0F0;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #0F7DBE, stop:1 #1582C3);
}

QTableView::item:hover, QListView::item:hover, QTreeView::item:hover {
    color: #F0F0F0;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #50A3F0, stop:1 #489CEA);
}

QTableView::item, QListView::item, QTreeView::item {
    padding: 5px;
    margin: 0px;
}

QHeaderView::section {
    padding:3px;
    margin:0px;
    color:#F0F0F0;
    border: 1px solid #F0F0F0;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #50A3F0, stop:1 #489CEA);
}

QTabBar::tab {
    border-bottom-left-radius:0px;
    border-bottom-right-radius:0px;
    color: #F0F0F0;
    min-width: 60px;
    min-height: 20px;
    padding: 3px 8px 3px 8px;
    margin:1px;
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #50A3F0, stop:1 #489CEA);
}

QTabBar::tab:selected, QTabBar::tab:hover {
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #0F7DBE, stop:1 #1582C3);
}

QStatusBar::item {
     border: 1px solid #50A3F0;
     border-radius: 3px;
}

Qt StyleSheet皮肤css源码的更多相关文章

  1. Normalize.css源码注释翻译&浏览器css兼容问题的理解

    版本v5.0.0源码地址: https://necolas.github.io/normalize.css/5.0.0/normalize.css 翻译版: /*! normalize.css v5. ...

  2. 帮助你实现漂亮界面的14套免费的 HTML/CSS 源码

    在网络上能找很多免费的 PSD 格式素材,但是很少有 HTML/CSS 界面组件下载.在这篇文章中,收集了14套免费的 HTML/CSS 界面源码分享给前端设计师和开发者们.这些组件包括按钮.滑块.表 ...

  3. Qt StyleSheet皮肤(黑色,比较好看,而且很全)

    使用方式如下 //设置皮肤样式 static void SetStyle(const QString &styleName) { QFile file(QString(":/imag ...

  4. html+css源码之实现登录弹出框遮罩层效果

    在web开发中,很多网站都做了一些特别炫丽的效果,比如用户登录弹框遮罩层效果,本文章向大家介绍css如何实现登录弹出框遮罩层效果,需要的朋友可以参考一下本文章的源代码. html+css实现登录弹出框 ...

  5. 2014年6月份第1周51Aspx源码发布详情

    企业汽车服务终端管理系统源码  2014-6-3 [VS2010]源码描述:本系统专门服务于(汽车美容4s店) 完整的一套汽车美容管理服务系统. 功能介绍:汽车美容服务终端功能强大而又简便实用,界面友 ...

  6. 微信小程序——智能小秘“遥知之”源码分享(语义理解基于olami)

    微信小程序智能生活小秘书开发详解 >>>>>>>>>>>>>>>>>>>>> ...

  7. QT源码分析(从QApplication开始)

    QT源码分析 转载自:http://no001.blog.51cto.com/1142339/282130 今天,在给同学讲东西的时候,谈到了Qt源代码的问题,才发现自己对Qt机制的了解是在太少了,而 ...

  8. jQuery-1.9.1源码分析系列(九) CSS操作

    jquery.fn.css获取当前jQuery所匹配的元素中第一个元素的属性值[$(…).css(cssName),注意这个cssName可以是数组]或给当前jQuery所匹配的每个元素设置样式值[$ ...

  9. vs下 qt源码调试

    1.下载qt源码,我下载的是4.7.1版本 2.vs安装qt插件qt-add-in 3.进入qt根目录,打开configure文件,找到 QT_DEFAULT_BUILD_PARTS="li ...

随机推荐

  1. ahjesus在asp.net中还可以通过设置HttpCookie对象的过期时间为DateTime.MinValue来指定此Cookies为跟随浏览器生效

    ahjesus在asp.net中还可以通过设置HttpCookie对象的过期时间为DateTime.MinValue来指定此Cookies为跟随浏览器生效

  2. AP(affinity propagation)研究

    待补充…… AP算法,即Affinity propagation,是Brendan J. Frey* 和Delbert Dueck于2007年在science上提出的一种算法(文章链接,维基百科) 现 ...

  3. how to use ldid

    1.进入管理员权限 sudo -s 2.赋予app运行权限 chmod -R 777 cellmap.app 3.查看app权限 ldid -e cellmap.app/cellmap 4.打开窗口 ...

  4. mybatis读取配置文件报错:Could not find resource configuration.xml

    今天用idea编译mybatis的java项目时,一直报错,找不到config.xml 查看class文件夹,确实没有xml文件 也就是说,xml文件没在编译范围内 在pom.xml中,把xml文件加 ...

  5. Java经典实例:使用正则表达式:测试模式

    import java.util.regex.Pattern; /** * Created by Frank * 在Java中使用正则表达式:测试模式 */ public class RESimple ...

  6. DP大作战—状态压缩dp

    题目描述 阿姆斯特朗回旋加速式阿姆斯特朗炮是一种非常厉害的武器,这种武器可以毁灭自身同行同列两个单位范围内的所有其他单位(其实就是十字型),听起来比红警里面的法国巨炮可是厉害多了.现在,零崎要在地图上 ...

  7. 【leetcode】Subsets II

    Subsets II Given a collection of integers that might contain duplicates, S, return all possible subs ...

  8. js数组到后台转 list数组

    前台的数组格式是: [{"credit_record_certificate_id":"452","credit_record_type": ...

  9. 【JavaScript】字符串处理函数集合

    var $string = {}, toString, template, parseURL, buildURL, mapQuery, test, contains, trim, clean, cam ...

  10. poj 3440 Coin Toss 概率问题

    这题主要是推导数学公式!!! 将概率问题转化为圆心所在的面积! 代码如下: #include<iostream> #include<stdio.h> #include<a ...