Skip to content

Fix: Disable Qt Android focus highlight in CI - #1187

Open
Splaser wants to merge 3 commits into
mmatyas:masterfrom
Splaser:master
Open

Fix: Disable Qt Android focus highlight in CI#1187
Splaser wants to merge 3 commits into
mmatyas:masterfrom
Splaser:master

Conversation

@Splaser

@Splaser Splaser commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes a blue highlight that remains visible on the main screen after opening and closing the search/filter input on Android 8.0 and newer.
7EB7A4E51AE5B301B5966D5C94F6D96D
60FD0C07E0C30E0121A2B95BB549CAD6

Cause

This highlight is not rendered by the Pegasus QML theme. Qt 5.15.10 creates a transparent native QtEditText view to communicate with the Android input method.

When the software keyboard is shown, Qt positions this view over the QML TextInput and requests focus. Hiding the keyboard does not clear the native view's focus, so Android continues drawing its default focus highlight at the previous input position.

Fix

Add a small patch for Qt's Android QtEditText implementation that disables the default focus highlight on API 26 and newer:

if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O)
    setDefaultFocusHighlightEnabled(false);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant