diff options
author | Michael Weghorn <[email protected]> | 2025-05-27 17:04:00 +0200 |
---|---|---|
committer | Michael Weghorn <[email protected]> | 2025-05-29 21:59:26 +0200 |
commit | 854d7021b80a68370d7d3a69af04881e11681abc (patch) | |
tree | cb47802ab24868c3e806e63cdc2ec1110dabd43c /src/gui/kernel/qevent.cpp | |
parent | bb2121551c3d7b1af1553710bc211ba0e39b4212 (diff) |
Map QAccessible::Attribute::Locale to
UIA_CulturePropertyId [1] in the Windows UIA
accessibility bridge:
> Identifies the Culture property, which contains a
> locale identifier for the automation element (for
> example, 0x0409 for "en-US" or English (United States)).
In a test with 2 spinboxes whose locales were explicitly
set to
* QLocale(QLocale::English, QLocale::UnitedStates))
* QLocale(QLocale::Chinese, QLocale::China))
, retrieving the current value of UIA_CulturePropertyId (30015)
using NVDA's Python console gives the expected result:
With the spinbox whose locale is set to English/United States:
>>> hex(focus.UIAElement.GetCurrentPropertyValue(30015))
'0x409'
With the spinbox whose locale is set to Chinese/China:
>>> hex(focus.UIAElement.GetCurrentPropertyValue(30015))
'0x804'
as "[MS-LCID]: Windows Language Code Identifier (LCID) Reference" [2]
lists these identifiers as follows:
* 0x0409 en-US
* 0x0804 zh-CN
[1] https://learn.microsoft.com/en-us/windows/win32/winauto/uiauto-automation-element-propids
[2] https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f
Task-number: QTBUG-137144
Change-Id: I2b0cad9ab7ede9f01dee3d7f3efddb8c5335caaf
Reviewed-by: Volker Hilsheimer <[email protected]>
Diffstat (limited to 'src/gui/kernel/qevent.cpp')
0 files changed, 0 insertions, 0 deletions