Since 6.2.3 keyboard layout in Qt 6 applications resets to English without changing the layout globally in the system (so layout indicator still shows the expected language), it's reproducible even in the lineedits example, it's enough to disconnect & connect laptop charger to get the bug on my system, but Ctrl+A and backspace (i.e. cleaning the input area) makes the bug disappear (i.e. layout restores). setxkbmap -query:
I think https://codereview.qt-project.org/c/qt/qtbase/+/378691 is at fault.