Hi,
that rect is drawn because the item has focus. Because of your thread I noticed that I have the same problem with something similar I've done, so thanks 
I tried to get rid of it with item flags, but that didn't work. If you take out ItemIsSelectable the item won't be highlighted when clicking on it, but the rect will still be drawn. Taking out ItemIsEnabled prohibits the user from clicking the checkbox.
I guess the easiest solution would be to create a QStyledItemDelegate for that column, reimplement initStyleOption and do this:
QStyleOptionViewItemV4 *v4 = qstyleoption_cast<QStyleOptionViewItemV4 *>(option);
if (v4
->state.
testFlag(QStyle::State_HasFocus)) { v4
->state
^= QStyle::State_HasFocus;
}
QStyleOptionViewItemV4 *v4 = qstyleoption_cast<QStyleOptionViewItemV4 *>(option);
if (v4->state.testFlag(QStyle::State_HasFocus)) {
v4->state ^= QStyle::State_HasFocus;
}
To copy to clipboard, switch view to plain text mode
Bookmarks