0

I am attaching scene_ on QGraphicsView

QGraphicsItem* scene_ = new QGraphicsScene(this);
setScene(scene_);   

on scene I am adding 2 things

QGraphicsItem* prev_pixmap_item_ = scene_->addPixmap(pm);
scene_->addItem(prev_pixmap_item_);    
prev_pixmap_item_->setZValue (0);

QGraphicsItemGroup *roiToolGraphicsItem = new  QGraphicsItemGroup();
scene_->addItem(roiToolGraphicsItem);
roiToolGraphicsItem->setZValue(1);

I am able to add QGraphicsItem on scene ..

but when I remove once using this cmd .. after that I am not able to redraw

scene_->removeItem(roiToolGraphicsItem);

Please can someone help/

Second I need help .. I need mouse event on QGraphicsItem .. mouse Selected Qgraphicsitem I can able to identify so that I can take some action on that

Your help will be highly appreciated

TheDarkKnight
  • 27,181
  • 6
  • 55
  • 85

0 Answers0