VirtualKeyboard: mask the shadow input by the input item echo mode


The full screen mode mirrors the text of the focused input item into the
shadow input control, which decided whether to mask the text by testing
Qt.ImhHiddenText. Qt Quick input items clear that hint for
TextInput.Password and TextInput.PasswordEchoOnEdit and set
Qt.ImhSensitiveData instead, so the contents of a Qt Quick password
field were displayed in clear text above the keyboard. Widget based
input items were masked, since QLineEdit does set the hint.

Follow the echo mode of the input item instead, and fall back to the
input method hints only for input items that do not have an echo mode.
PasswordEchoOnEdit is masked like Password, because the shadow input
never has the active focus.

An input item with TextInput.NoEcho displays nothing at all, and so does
the shadow input which mirrors it. Hide the shadow input control and its
selection handles in that case, instead of reserving space for a control
that cannot show anything. Such an item used to be masked like a
password field, which also revealed the length of the text.

Pick-to: 6.12 6.11
Task-number: QTBUG-146100
Change-Id: I0f99fe6baf3eb76ec3c532f83d257d817212c7cf
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
commit71b412976c2a27777afb71140787ee086f59bb55
parentc5e666ee7bb61a8dd058b3c09d2309e6a3348866
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>
commit timeTue, 11 Aug 2026 06:08:20 +0000