Qt之QSS(QDarkStyleSheet)

 

目录(?)[+]

 

简述

关于样式,前面介绍了很多内容,下面分享一个深色样式表,很值得借鉴!

 

 

效果

这里写图片描述

QSS

/*
 * The MIT License (MIT)
 *
 * Copyright (c) <2013-2014> <Colin Duquesnoy>
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:

 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.

 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
QToolTip
{
    border: 1px solid #76797C; background-color: rgb(90, 102, 117);; color: white; padding: 5px; opacity: 200; } QWidget { color: #eff0f1; background-color: #31363b; selection-background-color:#3daee9; selection-color: #eff0f1; background-clip: border; border-image: none; outline: 0; } QWidget:item:hover { background-color: #3daee9; color: #eff0f1; } QWidget:item:selected { background-color: #3daee9; } QCheckBox { spacing: 5px; outline: none; color: #eff0f1; margin-bottom: 2px; } QCheckBox:disabled { color: #76797C; } QCheckBox::indicator, QGroupBox::indicator { width: 18px; height: 18px; } QGroupBox::indicator { margin-left: 2px; } QCheckBox::indicator:unchecked { image: url(:/qss_icons/rc/checkbox_unchecked.png); } QCheckBox::indicator:unchecked:hover, QCheckBox::indicator:unchecked:focus, QCheckBox::indicator:unchecked:pressed, QGroupBox::indicator:unchecked:hover, QGroupBox::indicator:unchecked:focus, QGroupBox::indicator:unchecked:pressed { border: none; image: url(:/qss_icons/rc/checkbox_unchecked_focus.png); } QCheckBox::indicator:checked { image: url(:/qss_icons/rc/checkbox_checked.png); } QCheckBox::indicator:checked:hover, QCheckBox::indicator:checked:focus, QCheckBox::indicator:checked:pressed, QGroupBox::indicator:checked:hover, QGroupBox::indicator:checked:focus, QGroupBox::indicator:checked:pressed { border: none; image: url(:/qss_icons/rc/checkbox_checked_focus.png); } QCheckBox::indicator:indeterminate { image: url(:/qss_icons/rc/checkbox_indeterminate.png); } QCheckBox::indicator:indeterminate:focus, QCheckBox::indicator:indeterminate:hover, QCheckBox::indicator:indeterminate:pressed { image: url(:/qss_icons/rc/checkbox_indeterminate_focus.png); } QCheckBox::indicator:checked:disabled, 

转载于:https://www.cnblogs.com/wangjian8888/p/7604499.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值