The events are automaticaly deleted when processed:
http://doc.trolltech.com/3.3/qcustomevent.html
Qt Code:
  1. ColorChangeEvent* ce = new ColorChangeEvent(blue);
  2. QApplication::postEvent( receiver, ce ); // Qt will delete it when done
To copy to clipboard, switch view to plain text mode