What I want to do is to delete or update the text value of the QGraphicsSimpleTextItem
that i added to a QGraphicsItem
,but for a certain cause the text do not update but it's acumulated in the item created.this is what i have done for now :
void DiagramItem::mouseDoubleClickEvent( QGraphicsSceneMouseEvent* event )
{
if (event->button() != Qt::LeftButton)
{
return;
}
Dialog *mydiag = new Dialog();
mydiag->show();
if(mydiag->exec())
{
QString tx = mydiag->getname();
txt = new QGraphicsSimpleTextItem;
txt->setText(tx);
txt->setParentItem(this);
}
}