TQCustomEvent is a generic event class for user-defined events. User defined events can be sent to widgets or other TQObject instances using TQApplication::postEvent() or TQApplication::sendEvent(). Subclasses of TQObject can easily receive custom events by implementing the TQObject::customEvent() event handler function.
TQCustomEvent objects should be created with a type ID that uniquely identifies the event type. To avoid clashes with the Qt-defined events types, the value should be at least as large as the value of the "User" entry in the TQEvent::Type enum.
TQCustomEvent contains a generic void* data member that may be used for transferring event-specific data to the receiver. Note that since events are normally delivered asynchronously, the data pointer, if used, must remain valid until the event has been received and processed.
TQCustomEvent can be used as-is for simple user-defined event types, but normally you will want to make a subclass of it for your event types. In a subclass, you can add data members that are suitable for your event type.
Constructs a custom event object with event type \fItype\fR. The value of \fItype\fR must be at least as large as TQEvent::User. The data pointer is set to 0.
Constructs a custom event object with the event type \fItype\fR and a pointer to \fIdata\fR. (Note that any int value may safely be cast to TQEvent::Type).