Qt logo

QFocusEvent Class Reference


The QFocusEvent class contains event parameters for widget focus events. More...

#include <qevent.h>

Inherits QEvent.

List of all member functions.

Public Members


Detailed Description

The QFocusEvent class contains event parameters for widget focus events.

Focus events are sent to widgets when the keyboard input focus changes.

The event handlers QWidget::focusInEvent() and QWidget::focusOutEvent() receive focus events.

See also: QWidget::setFocus() and QWidget::setFocusEnabled().

Examples: table/table.cpp qmag/qmag.cpp


Member Function Documentation

QFocusEvent::QFocusEvent ( int type )

Constructs a focus event object.

The type parameter must be either Event_FocusIn or Event_FocusOut.

bool QFocusEvent::gotFocus () const

Returns TRUE if the widget received the text input focus.

bool QFocusEvent::lostFocus () const

Returns TRUE if the widget lost the text input focus.


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


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

It was generated from the following files:


Copyright © 1998 Troll TechTrademarks
Qt version 1.42