Logo Search packages:      
Sourcecode: qt4-x11 version File versions

void QWidget::focusOutEvent ( QFocusEvent event  )  [protected, virtual, inherited]

This event handler can be reimplemented in a subclass to receive keyboard focus events (focus lost) for the widget. The events is passed in the event parameter.

A widget normally must setFocusPolicy() to something other than Qt::NoFocus in order to receive focus events. (Note that the application programmer can call setFocus() on any widget, even those that do not normally accept focus.)

The default implementation updates the widget (except for windows that do not specify a focusPolicy()).

See also:
focusInEvent(), setFocusPolicy(), keyPressEvent(), keyReleaseEvent(), event(), QFocusEvent

Reimplemented in QGraphicsView, QAbstractItemView, QAbstractButton, QAbstractSpinBox, QComboBox, QLabel, QLineEdit, QMenuBar, QPushButton, QTextBrowser, QTextEdit, Q3IconView, Q3ListBox, Q3ListView, Q3Table, and Q3ComboBox.

Definition at line 6362 of file qwidget.cpp.

References QWidget::focusPolicy, QWidget::isWindow(), and QWidget::update().

Referenced by QWidget::event(), QAbstractItemView::focusOutEvent(), QAbstractSpinBox::focusOutEvent(), QLabel::focusOutEvent(), QTextEdit::focusOutEvent(), Q3ComboBox::focusOutEvent(), and QAbstractButton::focusOutEvent().

{
    if (focusPolicy() != Qt::NoFocus || !isWindow())
        update();
}


Generated by  Doxygen 1.6.0   Back to index