SoftwareInputPanel with digits only - how?

  • I noticed quite a few apps where developers are using standard SoftwareInputPanel with alphabetics and digits, while user is only required to input digits.

    What is the method to call a SoftwareInputPanel that provides entering digits (the one that exists in Nokia devices)?

  • We should call setInputMethodHints on the editor before opening softwareinputpanel.



    //and then call below code to open software keypad.
    QEvent event(QEvent::RequestSoftwareInputPanel);
    QApplication::sendEvent(editor, &event);

    //to close kepad
    QEvent event(QEvent::CloseSoftwareInputPanel);
    QApplication::sendEvent(editor, &event);

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.