PDA

View Full Version : QTreeWidget and Selected Item



NIteLordz
12th February 2015, 01:12
I have a QTreeWidget with a few QTreeWidgetItems in it. Each QTreeWidgetItem has a custom editor that is attached using setItemWidget(...). I have modified my style sheet as follows



QTreeWidget::item:selected:active{
background-color: transparent;
color: #3d80df;
}

QTreeWidget::item:selected:!active {
background-color: transparent;
color: #3d80df;
}


so that when an item is selected, the color turns blue. However, the widget that is in column 1 that was set with setItemWidget is not showing a selected state.

What property in the style sheet do i need to modify, or how can i achieve this functionality.

wysota
12th February 2015, 09:44
Does it work for column 2? Anyway, widgets you set with setIndexWidget are not related to items so styling items has no influence on widgets.