在使用图标模式下的qlistview时,当选择一个图标时,我需要完全去除高亮显示。使用下面的代码后,图标下方的文本不再高亮显示,但仍会在选中时出现蓝色颜色覆盖图标。
有人知道如何在不必子类化QStandardItem的情况下更改图标上选择的颜色吗?
QString stylesheet = "";
stylesheet += "QListView::item:alternate {background-image: transparent; background-color: transparent;}";
stylesheet += "QListView::item:selected {background-image: transparent; background-color: transparent;padding: 0px;color: black;}";
stylesheet += "QListView::item:selected:active{background-image: transparent;background-color: transparent; color: black;}";
stylesheet += "QListView::item:selected:!active{background-image: transparent;background-color: transparent;color: black;}";
setStyleSheet(stylesheet);
有人知道如何在不必子类化QStandardItem的情况下更改图标上选择的颜色吗?