当前位置: 首页 > news >正文

Qt 样式表

Qt样式表可以在帮助文档中搜索  "Qt   Style   Sheets"  在帮助文档中可更详细的查阅相关资料。

通常情况下我们需要知道样式表中的各个样式,需要我们查阅官方文档的相关资料;

可以在帮助文档中搜索 "Qt  Style  Sheets  Reference"(样式参考表);

该样式参考表内容包括:

               样式小部件列表;(LIst  of  Stylable  Widgets)

               属性列表;             (List  of  Properties)

               图标列表;             (List  of  Icons)

               属性类型列表;      (List  of  Property  Types)

               伪状态列表;         (List  of  Pseudo-States)

               子控件列表;。     (List  of  Sub-Controls)

常用属性列表   List  of  Properties

  背景相关(background):

  background-color(背景颜色)  :   小部件使用的背景颜色。

                                                 【例】:QLabel{background-color:yellow}     

                                                               QLineEdit{background-color:rgb(255,0,0)}

 background-image(背景图像) : 小部件背景图像

                                                    【例】:QFrame{background-image:url(:/images/hydro.png)}

background-repeat(背景位置)

background-attachment(背景附件)

background-origin()

框式和边框宽度,指定端层颜色(border)

border-top  :  设置小部件的顶部边界缩写符号,相当于指定端级,端式或边缘宽度

                     border-top-color ,  border-top-style , border-top-width 。

border-right : 同上, border-right-color ,  border-right-style , border-right-width 。

border-bottom(底板) : 同上。border-left:同上。

border-color : 所有边界的边缘的颜色。

                      【例】:QLineEdit{

                                            border-width: 1px;

                                            border-style : solid;

                                            border-color : blue;

                                     }

 border-radius(边框圆角半径,):用来设置圆角

                          【例】:QLineEdit{

                                                  border-width: 2px;

                                                  border-style : solid;

                                                  border-radius: 4px;

                                          }

border-style(边框样式)   ;  常用的样式有,solid ,  none , dot-dot-dash。

                             【例】:QLabel{ border-style:solid };

button-layout : 按钮本身布局,常用的几种按钮布局,

                        0(WinLayout),1 (MacLayout),  2 (KdeLayout),  3 (GnomeLayout)  

                        5 (AndroidLayout)。

                         【例】: *{button-layout: 2}

           

http://www.lryc.cn/news/310797.html

相关文章:

  • leetcode hot100 每日温度
  • 【Java EE初阶二十六】简单的表白墙(二)
  • 【wpf】关于绑定的一点明悟
  • 叠罗汉游戏
  • 太阳能风吸式杀虫灯是什么
  • SpringBoot启动扩展应用:干预优化+加快启动时间
  • 探索Linux世界:初次接触和基本指令(文件操作)
  • 递归函数(c++题解)
  • Qt将Unicode转换成UTF8中文
  • HTTP 的 multipart 类型
  • 【NR 定位】3GPP NR Positioning 5G定位标准解读(二)
  • 为何代理IP的稳定性不如有线IP?
  • 【c++】 string类的模拟实现
  • transformer--transformer模型构建和测试
  • 从0到1全流程使用 segment-anything
  • Window系统部署Splunk Enterprise并结合内网穿透实现远程访问本地服务
  • Windows服务器:通过nginx反向代理配置HTTPS、安装SSL证书
  • LeetCode67 二进制求和
  • python | 列表,元组,字符串,集合,字典
  • 稀疏图带负边的全源最短路Johnson算法
  • oracle基础体系
  • k8s运维问题整理
  • 设计模式(一)设计模式分类和六大设计原则
  • git的学习与使用(笔记最全)
  • windows环境下Grafana+loki+promtail入门级部署日志系统,收集Springboot(Slf4j+logback)项目日志
  • 学习python时一些笔记
  • php基础学习之错误处理(其二)
  • 云计算 2月28号 (linux的磁盘分区)
  • demo型xss初级靶场
  • 【推荐算法系列十八】:DSSM 召回算法