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

更改QTableWidget的branch展开符样式为“+“加号字符

 css的配置

tree_widget.setStyleSheet("QTreeView::branch:closed:has-children:has-siblings { border-image: none; image: none; }"
                         "QTreeView::branch:open:has-children:has-siblings { border-image: none; image: none; }"
                         "QTreeView::branch:closed:has-children:!has-siblings { border-image: none; image: none; }"
                         "QTreeView::branch:open:has-children:!has-siblings { border-image: none; image: none; }"
                         "QTreeView::branch:closed:!has-children:has-siblings { border-image: none; image: none; }"
                         "QTreeView::branch:open:!has-children:has-siblings { border-image: none; image: none; }"
                         "QTreeView::branch:closed:!has-children:!has-siblings { border-image: none; image: none; }"
                         "QTreeView::branch:open:!has-children:!has-siblings { border-image: none; image: none; }"
                         "QTreeView::branch:closed:has-children:has-siblings:adjoins-item { border-image: none; image: none; }"
                         "QTreeView::branch:open:has-children:has-siblings:adjoins-item { border-image: none; image: none; }"
                         "QTreeView::branch:closed:has-children:!has-siblings:adjoins-item { border-image: none; image: none; }"
                         "QTreeView::branch:open:has-children:!has-siblings:adjoins-item { border-image: none; image: none; }"
                         "QTreeView::branch:closed:!has-children:has-siblings:adjoins-item { border-image: none; image: none; }"
                         "QTreeView::branch:open:!has-children:has-siblings:adjoins-item { border-image: none; image: none; }"
                         "QTreeView::branch:closed:!has-children:!has-siblings:adjoins-item { border-image: none; image: none; }"
                         "QTreeView::branch:open:!has-children:!has-siblings:adjoins-item { border-image: none; image: none; }"
                         "QTreeView::branch:closed { qproperty-icon: '+'; }"
                         "QTreeView::branch:open { qproperty-icon: '-'; }")


http://www.kler.cn/news/148248.html

相关文章:

  • Typora+PicGo+Minio搭建博客图床
  • 每日OJ题_算法_双指针⑧力扣18. 四数之和
  • 还在担心发抖音没素材跟文案?[腾讯云HAI] AIGC带你蹭热度“今年你失去了什么?”
  • Eigen学习(持续更新)
  • freerots启动过程分析(qemu仿真RISC-V架构为例)
  • 【计算机网络学习之路】序列化,反序列化和初识协议
  • ChromeDriver最新版本下载与安装方法
  • 【面试HOT200】滑动窗口篇
  • HNU练习七 字符串编程题7. 机器人游戏
  • DS图—图的最短路径/Dijkstra算法【数据结构】
  • 【数据结构/C++】线性表_顺序表的基本操作
  • Windows11通用快捷键集合
  • 嵌入式开发DDR的选择
  • python-面试重点问题
  • 【深度学习】CNN中pooling层的作用
  • 使用new Vue()的时候发生了什么?
  • Ajax技
  • 解锁领先的有限元分析软件ABAQUS:不同版本功能特点及价格
  • 月底年末如何成交?速看!外贸销冠都在用的催单技巧,让成交量飙升!
  • 【JavaEE初阶】——Linux 基本使用和 web 程序部署(下)
  • H5(uniapp)中使用echarts
  • 【办公软件】XML格式文件怎么转Excel表格文件?
  • C#学习相关系列之数组---常用方法使用(二)
  • C#,《小白学程序》第十六课:随机数(Random)第三,正态分布的随机数的计算方法与代码
  • SpectralGPT: Spectral Foundation Model 论文翻译1
  • 【开源】基于Vue.js的高校学生管理系统的设计和实现
  • 【Linux学习笔记】protobuf 基本数据编码
  • 链表OJ--下
  • 31.0/LinkedList/Set/ashSet/ TreeSet/Map/ HashMap/ TreeMap
  • rtsp点播异常出现‘circluar_buffer_size‘ option was set but it is xx