I have a question, who is responsible for deletion of QEvent objects? For example, in the code below I create a new QEvent object and pass it further to parent:

Qt Code:
  1. void IxGwText::keyPressEvent(QKeyEvent *event)
  2. {
  3. QString text = event->text();
  4.  
  5. QKeyEvent *newEvent;
  6.  
  7. if(text != "")
  8. {
  9. text = text.toLower();
  10. newEvent = new QKeyEvent(event->type(), event->key(), event->modifiers(), text);
  11. QGraphicsTextItem::keyPressEvent(newEvent);
  12. }
  13. else
  14. {
  15. QGraphicsTextItem::keyPressEvent(event);
  16. }
  17. }
To copy to clipboard, switch view to plain text mode 

newEvent is a newly created event. Is there a memory leak? Who handles the event object deletion? Thanx!