# QCustomEvent Class Reference

The QCustomEvent class provides support for custom events. More...

`#include <qevent.h>`

Inherits QEvent.

List of all member functions.

## Public Members

- QCustomEvent ( int type, void * data )
- void* data () const

## Detailed Description

The QCustomEvent class provides support for custom events.

QCustomEvent is a user-defined event type which contains a `void*.`

Warning: This event class is internally used to implement Qt enhancements. It is not advisable to use QCustomEvent in normal applications, where other event types and the signal/slot mechanism can do the job.

## Member Function Documentation

### QCustomEvent::QCustomEvent ( int type, void * data )

Constructs a custom event object with the event type type and a pointer to data.

### void * QCustomEvent::data () const

Returns a pointer to the event data (specified in the constructor).

The event data can be anything and must be casted to something useful based on the event type. Again, it is not recommended to use custom events unless you are implementing Qt kernel enhancements.

Search the documentation, FAQ, qt-interest archive and more (uses www.troll.no):

This file is part of the Qt toolkit, copyright © 1995-99 Troll Tech, all rights reserved.

It was generated from the following files:

- qevent.h: 1998/10/05
- qdnd_x11.cpp: 1998/12/17
- qevent.cpp: 1999/01/13