Login

Tag Archives: QGraphicsView

Grabbing all QGraphicItems current viewable in a QGraphicView

The best way to get a list of all items current displayed inside the QGraphicsView is done through the combination of three steps: get viewing rectangle get items intersecting or inside rectangle check for visibility 1 2 3 4 5 6 7 QList<QGraphicsItem* > viewItems = m_pView->items(m_pView->rect());   for(int i=0; i < viewItems.size(); ++i) { [...]

Posted in Qt Code | Also tagged , , | Leave a comment