PDA

View Full Version : remove selection behaviour of icons inside QTableWidget



thejester
8th September 2010, 08:39
Hi,

Im trying to remove the selection behaviour of icons inside a QTableWidget...
When you have a QTableWidget and add some icons to it, all images are displayed nicely, but the image in the cell that´s selected at that time is blurred.
It looks like there is some alpha blended selection drawn ON TOP of the icon....

I tried as followes (made the stylesheet text multi line for easy read):

ui.tbltest->setStyleSheet( ui.tbltest->styleSheet() +

" QTableWidget::item:selected
{
background-color:transparent;
border-color:red;
border:4px inset red;
border-style: solid;
}
QTableWidget::item::icon
{
selection-color:transparent;
}

" );


any ideas on how to proceed ?

thanks for any help!