From c138f55591ff916bad51ff3f80350df0587b1115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 8 Sep 2021 10:31:36 +0200 Subject: Clear up QWindow::isActive() documentation The isActive function does not determine if a window should be active, but whether it is currently active. The way the documentation was phrased may have lead people to believe the former. Pick-to: 6.2 6.2.0 5.15 Change-Id: I05a4cb3d8784a2fefa24bdd42ea96cfdae22b9d1 Reviewed-by: Giuseppe D'Angelo --- src/gui/kernel/qwindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gui/kernel/qwindow.cpp') diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 15fcceb9c1..06ac63c9d9 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -1241,11 +1241,13 @@ bool QWindow::isExposed() const */ /*! - Returns \c true if the window should appear active from a style perspective. + Returns \c true if the window is active. This is the case for the window that has input focus as well as windows that are in the same parent / transient parent chain as the focus window. + Typically active windows should appear active from a style perspective. + To get the window that currently has focus, use QGuiApplication::focusWindow(). */ bool QWindow::isActive() const -- cgit v1.2.3