QGraphicsView: Don't show selection rectangle
Solved
General and Desktop
-
Found solution myself but thought I share for others:
My Item was already a sublass of QGraphicsLineItem so in paint() I could simply clear the selected state flag and pass it to paint.
QStyleOptionGraphicsItem saved_option = *option; // need a copy as option is const
saved_option.state &= ~QStyle::State_Selected;
QGraphicsLineItem::paint(painter, &saved_option, widget);This works