当前位置: 首页 > 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/a/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 程序部署(下)