Hi friends,

Im overridding the focusOutEvent in QGraphicsTextItem

Qt Code:
  1. void EditTextItem::focusOutEvent(QFocusEvent *event)
  2. {
  3. setTextInteractionFlags(Qt::NoTextInteraction);
  4. emit lostFocus(this);
  5. QGraphicsTextItem::focusOutEvent(event);
  6. }
To copy to clipboard, switch view to plain text mode 

when the user edit the text item im saving the edited text to a file. before user edits the text im calling to show the previous text setPlainText("Old Data") which in turn calling focusOutEvent() of GraphicsTextItem and lostFocus() signal has been emitted and im saving the old data only to the file.

i want to know how to avoid setPlainText to call focusOutEvent .

please help me and thanks in advance ..