Qt6, TextField not work in Android
-
Hello, I’m developing an application for Android with Qt6, but I’ve encountered a few strange issues while using TextField. The TextField doesn’t seem to read any input method hints flags at all.
Code
import QtQuick import QtQuick.Controls import QtQuick.Layouts ApplicationWindow { visible: true TextField { id: field width: 300 height: 50 anchors.centerIn: parent inputMethodHints: Qt.ImhSensitiveData || Qt.ImhNoPredictiveText || Qt.ImhDigitsOnly } }
When I provide any flags to inputMethodHints, they are not recognized or interacted with.
Qt 6.7.2
Android 10Result
Additionally, sometimes I need to move the TextField down, and when I click on the input, the keyboard comes up over the input, making it invisible. I read that setting an adjustPan variable in the Android manifest file would fix this, but it didn’t work for me. Does anyone have any ideas?
-
This post is deleted!
-
I don't have any knowledge to contribute about
inputMethodHints
.But for the keyboard-covers-input issue, I think that is the known qt-android bug: https://bugreports.qt.io/browse/QTBUG-125323
-
Is Qt a balloon? Working with Qt on Android has been a struggle for a year. I downloaded Qt 6.8, and this issue still hasn't been resolved. Can you believe it? It'll be 2025. Qt 6.8 has been released, and we still can't use input on Android? I used to enjoy developing with Qt, but I'm starting to wonder if I learned it for nothing.
I'm using Qt 6.8 and I've created an Android application for testing, which includes a TextField. When I click on the TextField, the keyboard comes over the input, and I can't see what is being typed.