QCustomEvent is a generic event class for user-defined events. User defined events can be sent to widgets or other TQObject instances using QApplication::postEvent() or QApplication::sendEvent(). Subclasses of TQObject can easily receive custom events by implementing the TQObject::customEvent() event handler function.
QCustomEvent 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 QEvent::Type enum.
.PP
QCustomEvent 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.
.PP
QCustomEvent 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 QEvent::User. The data pointer is set to 0.
.SH "QCustomEvent::QCustomEvent ( Type type, void * data )"
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 QEvent::Type).
.SH "void * QCustomEvent::data () const"
Returns a pointer to the generic event data.
.PP
See also setData().
.SH "void QCustomEvent::setData ( void * data )"
Sets the generic data pointer to \fIdata\fR.
.PP
See also data().
.SH "SEE ALSO"
.BR http://doc.trolltech.com/qcustomevent.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in