QGraphicsItem select only border
I'm using a QGraphicsScene where I insert QGraphicsItems. I would like to know if it is possible to select only the edge of the object and not the whole object.
For example if I draw a rectangle I would like to have the possibility to select it only through the border is not inside it.
I'm using Qt5 on Windows.
Yes it is, but you have to implement your own detection mechanism based on the mouse events..
reimplement QGraphicsItem::shape() by only returning the path only containing the border area you want to be selectable.
Then you can also use the selection capabilities of graphic items.