<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>Events and Event Filters</h1>
<p> In TQt, an event is an object that inherits <ahref="ntqevent.html">TQEvent</a>. Events are
delivered to objects that inherit <ahref="ntqobject.html">TQObject</a> through calling <ahref="ntqobject.html#event">TQObject::event</a>(). Event delivery means that an event has occurred, the
<ahref="ntqevent.html">TQEvent</a> indicates precisely what, and the <ahref="ntqobject.html">TQObject</a> needs to respond. Most
events are specific to <ahref="ntqwidget.html">TQWidget</a> and its subclasses, but there are
<p> Some events come from the window system, e.g. <ahref="qmouseevent.html">TQMouseEvent</a>, some
from other sources, e.g. <ahref="qtimerevent.html">TQTimerEvent</a>, and some come from the
application program. TQt is symmetric, as usual, so you can send
events in exactly the same ways as TQt's own event loop does.
<p> Most events types have special classes, most commonly <ahref="qresizeevent.html">TQResizeEvent</a>,
<ahref="qpaintevent.html">TQPaintEvent</a>, <ahref="qmouseevent.html">TQMouseEvent</a>, <ahref="qkeyevent.html">TQKeyEvent</a> and <ahref="qcloseevent.html">TQCloseEvent</a>.
There are many others, perhaps forty or so, but most are rather odd.
for example, <ahref="qresizeevent.html">TQResizeEvent</a>. In the case of <ahref="qresizeevent.html">TQResizeEvent</a>, <ahref="qresizeevent.html#size">TQResizeEvent::size</a>() and <ahref="qresizeevent.html#oldSize">TQResizeEvent::oldSize</a>() are added.
<p> Some classes support more than one event type. <ahref="qmouseevent.html">TQMouseEvent</a>
function. For example, <ahref="qpaintevent.html">TQPaintEvent</a> is delivered by calling <ahref="ntqwidget.html#paintEvent">TQWidget::paintEvent</a>(). This virtual function is responsible for
by installing an event filter on <ahref="ntqapplication.html">TQApplication</a>. This is what <ahref="ntqtooltip.html">TQToolTip</a> does in order to see <em>all</em> the mouse and keyboard activity.
of the relevant type, and then call <ahref="ntqapplication.html#sendEvent">TQApplication::sendEvent</a>() or <ahref="ntqapplication.html#postEvent">TQApplication::postEvent</a>().
they are are compacted into one. The same applies to paint events: <ahref="ntqwidget.html#update">TQWidget::update</a>() calls postEvent(), which minimizes flickering and