Qt logo

QEvent Class Reference

The QEvent class is base class of all event classes. Event objects contain event parameters. More...

#include <qevent.h>

Inherits Qt.

Inherited by QChildEvent, QCloseEvent, QCustomEvent, QDragLeaveEvent, QDragResponseEvent, QDropEvent, QFocusEvent, QHideEvent, QKeyEvent, QMouseEvent, QMoveEvent, QPaintEvent, QResizeEvent, QShowEvent, QTimerEvent and QWheelEvent.

List of all member functions.

Public Members

Detailed Description

The QEvent class is base class of all event classes. Event objects contain event parameters.

The main event loop of Qt fetches native window system events from the event queue, translates them into QEvent and sends the translated events to QObjects.

Generally, events come from the underlying window system, but it is also possible to manually send events through the QApplication class using QApplication::sendEvent() and QApplication::postEvent().

QObject received events by having its QObject::event() function called. The default implementation simply calls QObject::timerEvent() for timer events and ignores all other events. QWidget reimplements event() and dispatches incoming events to various event handles such as QWidget::keyPressEvent() and QWidget::mouseMoveEvent().

The basic QEvent only contains an event type parameter. Subclasses of QEvent contain additional parameters that describe the particular event.

See also: QObject::event(), QObject::installEventFilter(), QWidget::event(), QApplication::sendEvent(), QApplcation::postEvent() and QApplication::processEvents().

Member Function Documentation


Contructs an event object with a type. The file qevent.h lists all event types.

QEvent::~QEvent() [virtual]

Destroys the event. Reports an error if the event is posted for dispatch to an object.

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.

Copyright 1999 Troll TechTrademarks
Qt version 2.0.2