PDA

View Full Version : get currently visible items in QGraphicsScene



Santa.fat
29th October 2015, 18:04
hi friends.

i want to get currently visible (showing) item(s) in QGraphicsScene and if number of items is more than one determine which one's showing part is more than others.

sorry for my bad english

ChrisW67
29th October 2015, 20:14
You can ask the view which items fall inside its viewport rectangle:

QList<QGraphicsItem *> items = view->items(view->viewport->rect());

I am not familiar enough with the API to answer the amount of intersection aspect of this question.