qt6-bb10/tests/auto/widgets
Sona Kurazyan 154573929a Fix setting active window as application's focus widget
When setting the application's focus widget we search for the next
child widget that can hold the focus and call its setFocus() method,
which also updates focus widgets of all its parent wigets.

In case if the focus widget is the active window itself, we only set it
as the application's focus widget, but we don't update the focus widget
of the active window itself. Because of this the focusWidget() method
always results nullptr for the active window. This prevents from setting
the focus back to active window after the focus has changed (for example
after a context menu is closed, as in the bugreport).

Transfer the focus to active window by calling the setFocus() method, as
it is done in case of transferring the focus to any other widget.

Pick-to: 6.0 5.15
Fixes: QTBUG-85846
Change-Id: I91ebf182fd5bb7d451a1186e2f3e38c8d48acc4e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-15 15:22:18 +01:00
..
dialogs Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
effects Remove the qmake project files 2021-01-07 15:32:28 +01:00
graphicsview Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
itemviews Remove the qmake project files 2021-01-07 15:32:28 +01:00
kernel Fix setting active window as application's focus widget 2021-01-15 15:22:18 +01:00
styles Set the PlaceholderText color in the palette from the stylesheet as well 2021-01-12 20:24:28 +01:00
util Remove the qmake project files 2021-01-07 15:32:28 +01:00
widgets Fix the tips still show when cursor move to another action 2021-01-15 12:26:41 +01:00
CMakeLists.txt