hello,

i can learn if my object inherits from QGraphicsItem is focused in paint method:

Qt Code:
  1. void MyQGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *)
  2. {
  3. if (option->state & QStyle::State_HasFocus) {
  4. //if focus some shape
  5.  
  6. } else {
  7. //if no focus another shape
  8. }
  9. }
To copy to clipboard, switch view to plain text mode 

but i must click it and the shape must change whether it is focused or not.
how can i get if focused information in

Qt Code:
To copy to clipboard, switch view to plain text mode 

method in an appropriate way?
I think to declare a global variable but i do not like this idea.
thanks