Issue with custom delegate in tableview
Hi,
I have issue with Highlighting cell of tableView with my own delegate (checkbox), i used this code :
Code:
if(option.
state & QStyle::State_Selected) {
painter->fillRect(option.rect,option.palette.highlight());
}
this works but the problem is that when the focus of table is changed the color of selected row have to be gray but in my table the color of my delegate cells will stay dark blue(state_selected).
How to fix that?
thanks
Re: Issue with custom delegate in tableview
At a guess, paint it differently when the state is not QStyle::State_Active or Style::State_HasFocus or QStyle::State_Enabled
Re: Issue with custom delegate in tableview
thanks, I think so but with which palette i should paint it? (which palette is inactive cells in table view. I've seek it in QPalette but nothing found!)
Re: Issue with custom delegate in tableview
Anyone knows how to deal with it?! Whats the palette of unfocused cells?
Re: Issue with custom delegate in tableview