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