From 4f19cd391aa32b12b9f749af06ebe6836cd0cbae Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Tue, 1 Sep 2009 13:31:10 +0200 Subject: Doc: Said what happens when setFocus() is called on a widget in an inactive window. Task-number: 78707 Reviewed-by: Morten Engvoldsen --- src/gui/kernel/qwidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 37ffa8fb..863c43e 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -5962,6 +5962,8 @@ bool QWidget::hasFocus() const isActiveWindow() active window\endlink. The \a reason argument will be passed into any focus event sent from this function, it is used to give an explanation of what caused the widget to get focus. + If the window is not active, the widget will be given the focus when + the window becomes active. First, a focus out event is sent to the focus widget (if any) to tell it that it is about to lose the focus. Then a focus in event -- cgit v0.12