Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. OS numeric input panel block(windows and ios touch devices)
Forum Updated to NodeBB v4.3 + New Features

OS numeric input panel block(windows and ios touch devices)

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 328 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Amarjit123
    wrote on 1 Mar 2022, 04:50 last edited by
    #1

    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.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on 2 Mar 2022, 03:53 last edited by
      #2

      What have you done with Qt::WA_InputMethodEnabled?

      A 2 Replies Last reply 2 Mar 2022, 04:27
      0
      • C ChrisW67
        2 Mar 2022, 03:53

        What have you done with Qt::WA_InputMethodEnabled?

        A Offline
        A Offline
        Amarjit123
        wrote on 2 Mar 2022, 04:27 last edited by
        #3

        @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 ?

        1 Reply Last reply
        0
        • C ChrisW67
          2 Mar 2022, 03:53

          What have you done with Qt::WA_InputMethodEnabled?

          A Offline
          A Offline
          Amarjit123
          wrote on 10 Mar 2022, 12:44 last edited by
          #4

          @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.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved