aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/basic/impl/qquickbasicbusyindicator_p.h
diff options
context:
space:
mode:
authorMohammadHossein Qanbari <mohammad.qanbari@qt.io>2024-07-29 18:03:39 +0200
committerDoris Verria <doris.verria@qt.io>2024-10-01 21:13:51 +0200
commitfd1f8ea4e09cc0a3c007db462db35abbf92ef54d (patch)
tree4e811d6e44fb6e24b98abea91e4c978385c4e7fc /src/quickcontrols/basic/impl/qquickbasicbusyindicator_p.h
parentd37583094a73ca85151f07c4570db916424d7a94 (diff)
QQuickWidget: Assign focus to offscreen window when focus chain wraps
The focus did not move from QQuickWidget to sibling widgets. Additionally, when focus moved to QQuickWidget via tab/backtab key events, the item that was focused before the focus moved out was refocused. This is expected when the focus reason is not tab or backtab. In such cases, it is expected that the first/last item should be focused due to tab/backtab focus reasons. To address this issue, QQuickWidget checks the next/previous candidate in its child items through the focusNextPrevChild() method. If QQuickWidget cannot find any candidates, it should behave like a QWidget. Otherwise, it simulates a tab/backtab focus event for the offscreen window (QQuickWindow) to determine which item should be focused. The test case demonstrates a window containing a QQuickWidget with three rectangle items, a middle widget, and another QQuickWidget with three rectangle items. It then sends some Tab and Backtab events and verifies that the expected order of items and widgets is followed. The expected order varies depending on the direction of focus change (forward if the Tab key is pressed and backward if the Backtab key is pressed). [ChangeLog][QtQuick][QQuickWidget] The first/last item must be focused when QQuickWidget receives a focus-in event due to tab/backtab reasons. In other cases, such as ActiveWindowFocusReason, the item that was focused before will be refocused. Pick-to: 6.8 Change-Id: Ie25e6c2c46e20e15a5db014e0054b8b9da2d8a21 Reviewed-by: Doris Verria <doris.verria@qt.io>
Diffstat (limited to 'src/quickcontrols/basic/impl/qquickbasicbusyindicator_p.h')
0 files changed, 0 insertions, 0 deletions