博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
QTreeView
阅读量:7071 次
发布时间:2019-06-28

本文共 481 字,大约阅读时间需要 1 分钟。

 

隐藏左侧的小箭头

 : bool

treeView.setRootIsDecorated(False)

 

或者

 

    treeView.setStyleSheet( "QTreeView::branch {image:none;}" )

 

 

 

 设置item不同状态下显示背景色的代码,设置方法同上: 源码中设置:

 treeWidget->setStyleSheet( "QTreeView::item:hover{background-color:rgb(0,255,0,50)}"
 "QTreeView::item:selected{background-color:rgb(255,0,0,100)}" );
 在样式设置界面,添加如下两句:
 QTreeView::item:hover{background-color:rgb(0,255,0,50)}
 QTreeView::item:selected{background-color:rgb(255,0,0,100)}

转载于:https://www.cnblogs.com/ribavnu/p/4832278.html

你可能感兴趣的文章
crt 和 Windows之间传输大文件
查看>>
软件项目版本号的命名规则及格式
查看>>
Jetty
查看>>
ARC
查看>>
IntelliJ IDEA java项目导入jar包,打jar包
查看>>
理解与应用css中的display属性
查看>>
78.员工个人信息保镖页面 Extjs 页面
查看>>
异常:Project configuration is not up-to-date with pom.xml解决方案
查看>>
Apple 微软 Google 都在竞购一家创业公司
查看>>
空合并运算符“??”
查看>>
Codeforces Round 428 B Game of the rows 贪心 思维
查看>>
asp.net三层架构初探<二>
查看>>
NOJ 1116 哈罗哈的大披萨 【淡蓝】 [状压dp+各种优化]
查看>>
记一次论文投递
查看>>
[04] css 选择器
查看>>
对 hiren bootcd 15.2 中的 XP 系统作了汉化, 同时支持中文输入法。提供下载
查看>>
Quartz.NET
查看>>
SpringMVC输入验证
查看>>
解决用sudo执行命令时报"xxx is not in the sudoers file.This incident will be reported"错误
查看>>
代写CSE214作业、代做Java程序作业、代写Java编程作业、Java语言作业代做、代写Java实验作业...
查看>>