Thank you all for your help. Based on your analysis, here is my solution,
Create section
auto pTextItem=new QGraphicsTextItem("QGraphicsTextItem",pV);
auto id=reinterpret_cast<void*>(dynamic_cast<QGraphicsItem*>(pTextItem));
deletion
void DeleteGraphics(void* id)
{
if (id==nullptr)
return;
auto scene=m_pQGraphicsView->scene();
auto items=scene->items();
QGraphicsItem* item = static_cast<QGraphicsItem*>(id);
if(items.contains(item)){
scene->removeItem(item);
delete item;
}
}