Classes - Annotated - Tree - Functions - Home - Structure Qte

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

Static 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. This happens due to either a mouse action, the tab key, the window system, a keyboard shortcut or some other application specific issue. The actual reason for a specific event is obtained by reason() in the appropriate event handler.

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

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

Examples: qmag/qmag.cpp

Member Type Documentation


See the focus overview for more about focus.

Member Function Documentation

QFocusEvent::QFocusEvent ( Type type )

Constructs a focus event object.

The type parameter must be either QEvent::FocusIn or QEvent::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.

QFocusEvent::Reason QFocusEvent::reason() [static]

Returns the reason for this focus event.

See also setReason().

void QFocusEvent::resetReason () [static]

Resets the reason for all future focus events to the value before the last setReason() call.

See also reason() and setReason().

void QFocusEvent::setReason ( Reason reason ) [static]

Sets the reason for all future focus events to reason.

See also reason() and resetReason().

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

This file is part of the Qt toolkit, copyright © 1995-2005 Trolltech, all rights reserved.

Copyright © 2005 TrolltechTrademarks
Qt version 2.3.10