OS numeric input panel block(windows and ios touch devices)
-
wrote on 1 Mar 2022, 04:50 last edited by
I have a requirement to make a customize keypad on click of textedit, for which I have to block the default input panel in Qt. I have tried qapp-> setAutoSipEnabled(false) and qApp->inputMethod()->hide() which is not restricting the default os level numeric pad. Can anyone tell me the flow and the steps OS API is called to open a numeric pad in Qt app on click of text field. Basically I have to find the API to restrict opening the default numeric pad. This will be done both for WIndows and ios tocuh devices.
-
wrote on 2 Mar 2022, 03:53 last edited by
What have you done with Qt::WA_InputMethodEnabled?
-
What have you done with Qt::WA_InputMethodEnabled?
wrote on 2 Mar 2022, 04:27 last edited by@ChrisW67 I have just added the line of code qApp->inputMethod()->hide(), will get executed, when i am clicking on the input panel. could you please tell me the correct approach, which API to use or any example code snippet ?
-
What have you done with Qt::WA_InputMethodEnabled?
wrote on 10 Mar 2022, 12:44 last edited by@ChrisW67 I invoked this and then tried this way, did not work.
QApplication qapp(argc, argv);
Widget w;
w.setAttribute(Qt::WA_InputMethodEnabled, false);
qApp->setAutoSipEnabled(false);Do I have to override QInputMethodEvent, as I came across in another article. Also they are saying like setAttribute should be called before widget creation, but since it is a non static function we have to use an object only. could you please guide me as you have knowledge on this. If possible please send me a sample code, will be helpful for me to achieve my goal. I will wait for your reply, Thanks in advanced.