You need to make your item selectable. Add the following line to the MyItem constructor:
Qt Code:
  1. setFlags(QGraphicsItem::ItemIsSelectable);
To copy to clipboard, switch view to plain text mode