自定义QSS
/*QComboBox*/
QComboBox {
border: 1px solid rgb(111, 156, 207);
border-radius: 3px;
padding: 1px 18px 1px 3px;
min-width: 6em;
max-width:6em;
}
QComboBox::drop-down {
subcontrol-origin: padding;
subcontrol-position: top right;
width: 15px;
border-left-width: 1px;
border-left-color: darkgray;
border-left-style: solid;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
QComboBox QAbstractItemView {
border: 2px solid darkgray;
selection-background-color: lightgray;
}
/*QLineEdit*/
QLineEdit{
min-width:50px;
max-width:50px;
border: 2px solid gray;
border-radius: 10px;
padding: 0 8px;
background: yellow;
selection-background-color: darkgray;
}
/*QPushButton*/
QPushButton{
min-width:75px;
max-width:75px;
min-height:20px;
border:1px solid black;
border-radius:5px;
}
QPushButton:hover{
background-color: #333333;
border-color: #444444;
color:rgb(255,255,255);
}
QPushButton:pressed{
background-color: #111111;
border-color: #333333;
color: yellow;
}
/*QTabWidget*/
QTabWidget::tab-bar {
alignment: left;
}
QTabWidget::pane {
border-top: 2px solid #C2C7CB;
}
QTabBar::tab:selected {
margin-top:0px;
border-color: #9B9B9B;
border-bottom-color: #C2C7CB;
}
QTabBar::tab:!selected {
margin-top: 2px;
}
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: 2px solid #C4C4C3;
border-bottom-color: #C2C7CB;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
min-width: 8ex;
padding: 2px;
}
/*QWidget*/
QWidget{
background-color:#F5F5F5;
}
/*QGroupBox*/
QGroupBox {
border: 2px solid gray;
border-radius: 5px;
margin-top: 1ex;
}
QGroupBox::title {
subcontrol-origin: margin;
subcontrol-position: top center;
padding: 0 3px;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #FF0ECE, stop: 1 #FFFFFF);
}
/*QCheckBox*/
QCheckBox::indicator{
width: 13px;
height: 13px;
background-color: #00FF00;
border: 1px solid #000000;
border-radius:4px;
}
QCheckBox::indicator::checked{
background-color: qradialgradient(cx:0.5, cy:0.5, fx:0.25, fy:0.15,
radius:0.3, stop:0 #FF0000, stop:1 #FFFFFF);
}
/*QtextEdit*/
QTextEdit{
border: 1px solid gray;
border-radius: 5px;
}
QTextEdit#textEdit{
background-color: rgb(235, 255, 203);
}
QTextEdit#textEdit_2{
background-color: rgb(194, 255, 194);
}
QTextEdit#textEdit_3{
background-color: rgb(170, 255, 127);
}
QScrollBar:vertical{
width:8px;
background:rgba(0,0,0,0%);
margin:0px,0px,0px,0px;
padding-top:9px;
padding-bottom:9px;
}
QScrollBar::handle:vertical{
width:8px;
background:rgba(0,0,0,25%);
border-radius:4px;
min-height:20;
}
QScrollBar::handle:vertical:hover{
width:8px;
background:rgba(0,0,0,50%);
border-radius:4px;
min-height:20;
}
/*MainWindow设置背景图,为了防止不干扰其他控件,需要指定背景图只作用于MawinWindow*/
#MainWindow{background-image: url(:/new/prefix1/log1.jpg);}
/*登录界面*/

qss:
#Login{background-image: url(:/new/prefix1/timg1.jpg);}
QCheckBox::indicator{
width: 13px;
height: 13px;
background-color: #00FF00;
border: 1px solid #000000;
border-radius:4px;
}
QCheckBox::indicator::checked{
">radius:0.3, stop:0 #FF0000, stop:1 #FFFFFF);
}
/*QLineEdit {
border:1px solid gray;
border-radius: 1px;
background: yellow;
selection-background-color:blue;
min-width:200px;
min-height:25px;
} */
QLineEdit {
min-width:200px;
min-height:25px;
border: 1px solid rgb(41, 57, 85);
border-radius: 3px;
background: white;
selection-background-color: blue;
font-size: 14px ;
}
QLineEdit:hover {
border: 1px solid yellow;
}
QPushButton{
border-radius: 4px;
border: none;
min-width: 75px;
min-height: 35px;
}
QPushButton:enabled {
background: rgb(68, 69, 73);
color: white;
}
QPushButton:!enabled {
background: rgb(100, 100, 100);
color: rgb(200, 200, 200);
}
QPushButton:enabled:hover{
background: rgb(85, 85, 85);
}
QPushButton:enabled:pressed{
background: rgb(80, 80, 80);
}
/*QMenu*/
sysMenu->setStyleSheet("QMenu {background-color:rgb(89,87,87); border: 3px solid rgb(235,110,36);}\
QMenu::item{font - size: 10pt;color: rgb(225, 225, 225);border: 3px solid rgb(60, 60, 60);\
background - color:rgb(89, 87, 87);padding:16px 16px;margin:2px 2px;}\
QMenu::item:selected{background - color:rgb(235, 110, 36);}\
QMenu::item:pressed{border: 1px solid rgb(60, 60, 61);background - color: rgb(220, 80, 6); }");

自定义QSS的更多相关文章
- Qt之QSS(Q_PROPERTY-自定义属性)
版权声明:进步始于交流,收获源于分享!纯正开源之美,有趣.好玩.靠谱...作者:一去丶二三里 博客地址:http://blog.csdn.net/liang19890820 目录(?)[+] ...
- 43.qt通过qss自定义外观
样式: 文件格式类型: candy.qss /* R1 */ QDialog { /*设置背景图片*/ background-image: url(:/images/background.png); ...
- Qt 之 自定义按钮 在鼠标 悬浮、按下、松开后的效果(全部通过QSS实现)
http://blog.csdn.net/goforwardtostep/article/details/53464925
- qss qt按钮自定义
- Qt 自定义 滚动条 样式
今天是时候把软件中的进度条给美化美化了,最初的想法就是仿照QQ. 先前的进度条是这样,默认的总是很难受欢迎的:美化之后的是这样,怎么样?稍微好看一点点了吧,最后告诉你实现这个简单的效果在Qt只需要加几 ...
- QSS总结以及最近做的Qt项目
什么是QSS QSS称为Qt Style Sheets也就是Qt样式表,它是Qt提供的一种用来自定义控件外观的机制.QSS大量参考了CSS的内容,只不过QSS的功能比CSS要弱很多,体现在选择器要少, ...
- QT自定义精美换肤界面
陆陆续续用QT开发过很多项目,也用QT写过不少私活项目,也写过N个工具,一直梦寐以求能像VC一样可以很方便的有个自定义的界面,QSS的强大让我看到了很好的希望,辗转百度谷歌无数次,一直搜索QT相关的换 ...
- QLineEdit 仿QQ签名框(思路很独特:用QSS::hover显示额外的图片)
今天鼓捣了半天,终于实现了自定义Qt中的QlineEdit控件的大致效果. 这个问题对于新手而言,主要有以下几个难点: 1.继承QLineEdit控件 2.QSS设置QLineEdit的相关样式,可以 ...
- Qt 自定义 滚动条 样式(模仿QQ)
今天是时候把软件中的进度条给美化美化了,最初的想法就是仿照QQ. 先前的进度条是这样,默认的总是很难受欢迎的:美化之后的是这样,怎么样?稍微好看一点点了吧,最后告诉你实现这个简单的效果在Qt只需要加几 ...
随机推荐
- nginx搭建文件服务器
在部署了各种应用后,产生的日志文件,需要在线下载查看,不用每次登陆服务器去拿: 这里,因为服务器部署了很多的应用程序,可以建一个主目录mylog,在主目录里用软连接将需要的各个日志文件夹都建好连接 l ...
- 解决Ajax请求跨域问题
from:https://blog.csdn.net/wang379275614/article/details/53333775 上篇文章提到,由于浏览器的同源策略,使得,AJAX请求只能发给同源的 ...
- 在UI线程之外,多线程处理Bitmaps
多线程处理Bitmaps 上一篇,我们讨论了:Android有效的处理Bitmap,降低内存 ,可是最好不要运行在主线程(UI线程),假设图片是本地的或者网络的又或者是其它地方的. 图片载入的 ...
- python uwsgi 部署以及优化
这篇文章其实两个月之前就应该面世了,但是最近琐事.烦心事太多就一直懒得动笔,拖到现在才写 一.uwsgi.wsgi.fastcgi区别和联系 参见之前的文章 http://www.cnblogs.co ...
- Java知识点梳理——抽象类和接口
抽象类 1.定义:没有包含足够的信息来描绘一个具体对象的类,不能被实例化,必须被继承: 2.abstract关键字:abstract class定义抽象类,普通类的其它功能依然存在,如变量.方法等: ...
- 【原】eclipse使用技巧之代码编辑器分隔窗口
相信很多使用Intellj IDE的朋友对其split screen功能赞赏有加!其实在eclipse中也可以方便地代码编辑多windows.多views!但是隐藏的有点深,很多朋友不常用到,甚至以为 ...
- selenium调用Firefox和Chrome需要注意的一些问题,和出现的报错selenium:expected [object undefined] undefined to be a string
在高版本selenium下如:selenium3.4.3 1.高版本的selenium需要浏览器安装一些补丁驱动 Firefox:geckodriver 下载网址:http://download.cs ...
- Java——BeanUtils基本用法
为了操作JavaBean的属性,sun公司自己写了一套内省的api(在Java.beans.*)中,但是我们发现操作起来还是比较复杂的,所以apache公司就自己写了一套api替代了它,大大方便了开发 ...
- 巨蟒python全栈开发-第16天 核能来袭-初识面向对象
一.今日内容总览(上帝视角,大象自己进冰箱,控制时机) #转换思想(从面向过程到面向对象) 1.初识面向对象 面向过程: 一切以事物的发展流程为中心. 面向对象: 一切以对象为中心,一切皆为对象,具体 ...
- Eclipse打包java工程
Eclipse打包java工程步骤如下: 1.选择预打包的工程->Export. 2.选择java->JAR file. 3.导出JAR文件设置. 这里有几个选项: Export gene ...