QML RegularExpressionValidator not working on android
-
wrote on 15 Feb 2022, 11:32 last edited by
Hi !
QML RegularExpressionValidator and IntValidator not working on android.
But it is work for Linux. How I can fix this?TextField { // TextInput { // validator: IntValidator {bottom: 1; top: 999999999} validator: RegularExpressionValidator { regularExpression: /[0-9]+/ } }
-
Hi !
QML RegularExpressionValidator and IntValidator not working on android.
But it is work for Linux. How I can fix this?TextField { // TextInput { // validator: IntValidator {bottom: 1; top: 999999999} validator: RegularExpressionValidator { regularExpression: /[0-9]+/ } }
-
Hi !
QML RegularExpressionValidator and IntValidator not working on android.
But it is work for Linux. How I can fix this?TextField { // TextInput { // validator: IntValidator {bottom: 1; top: 999999999} validator: RegularExpressionValidator { regularExpression: /[0-9]+/ } }
wrote on 15 Feb 2022, 11:42 last edited by@Mihaill said in QML RegularExpressionValidator not working on android:
QML RegularExpressionValidator and IntValidator not working on android.
But it is work for Linux. How I can fix this?I think you have to remove "text prediction" to made it works on Android, following should work:
TextField { validator: RegularExpressionValidator { regularExpression: /[0-9]+/ } inputMethodHints: Qt.ImhNoPredictiveText }
-
wrote on 15 Feb 2022, 14:31 last edited by
@KroMignon said in QML RegularExpressionValidator not working on android:
TextField {
validator: RegularExpressionValidator { regularExpression: /[0-9]+/ }
inputMethodHints: Qt.ImhNoPredictiveText
}It is not work for android. I use Qt 6.2.2
-
wrote on 22 Feb 2022, 06:27 last edited by
Is that what you need?
inputMethodHints: Qt.ImhDigitsOnly
-
wrote on 22 Feb 2022, 09:34 last edited by Mihaill
@morte said in QML RegularExpressionValidator not working on android:
inputMethodHints: Qt.ImhDigitsOnly
It is not works for Ubuntu, but works for Android
1/6