如何删除QTreeView的项目选择边框

问题描述

我有一个 QTreeView 小部件,我想删除项目选择边框。 我尝试在 item: selected 子控件中使用 border 属性,但它是针对整个项目(图像 + 字符串)执行的。但是当项目被选中时,项目的边框仍然出现在字符串部分。是否有任何我遗漏的属性或子控件?

页面截图:

Screen shot of the page

QTreeView{
    background-color: #323232;
    border: none;
    border-radius: 3px;
    color: #9e9e9e;
    font-size: 15px;
    font-family: "Roboto";
}
QTreeView::item{
    border: none;
}
QTreeView::item:hover,QTreeView::item:selected{
    border: none;
    background-color: #424242;
    color: #bdbdbd;
}

属性 selection-color 或 selection-background-color 是否有任何 selection-border 属性

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)