Select input keyboard type for QLineEdit

Basically, I need a function that is documented here: http://developer.android.com/training/keyboard-input/style.html

I need to specify the input type for QLineEdit, in particular I need to set it to keyboard input.

keyboard input image

I can not find anything in the Qt documentation.

+4
source share
1 answer

Use QLineEdit::setInputMethodHintsand try hints such Qt::ImhPreferNumbersas Qt::ImhDigitsOnlyor Qt::ImhFormattedNumbersOnlyor ImhDialableCharactersOnly.

+2
source

Source: https://habr.com/ru/post/1620522/


All Articles