PDA

View Full Version : How i can detect intersects line shape with rect on qgraphicsscene



bmn
23rd May 2014, 07:13
Hello. How i can detect intersection line shape with rect on qgraphicsscene? I know how to do it only with line boundingrect.
Line inherited from QGraphicsItem

high_flyer
23rd May 2014, 10:21
Not sure what you mean.
QGraphicsScene has not visual representation, and thus it cannot intersect with anything.
From the docs:

Note that QGraphicsScene has no visual appearance of its own; it only manages the items.
You can create a simple item to cover the all the size of the space you are interested in and make it the root parent of all the other objects in your scene.