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. Display Windows Touch Keyboard
Forum Updated to NodeBB v4.3 + New Features

Display Windows Touch Keyboard

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.0k 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.
  • C Offline
    C Offline
    claudia85
    wrote on last edited by
    #1

    i am writing an application for windows 8 with Qt and Qml. I want a touch keyboard appears when I set focus to a text input field, such as a search box. Things like textInput.openSoftwareInputPanel(); doesn't work for a desktop application. Windows 8 have a default touch keyboard, it is possible to display this keyboard. I can't find any solution for this problem. Can anyone help me?

    1 Reply Last reply
    0
    • F Offline
      F Offline
      FinitelyFailed
      wrote on last edited by
      #2

      I'm sorry that I am a bit late. But this C++ code might help:

      Show the keyboard (tabtip):
      ShellExecute(NULL, _TEXT("open"), _TEXT("C:\Program Files\Common Files\Microsoft Shared\Ink\TabTip.exe"), NULL, NULL, SW_SHOWNORMAL);
      QString keyboardProgram = "explorer.exe";
      QString keyboardFolder = "C:\Program Files\Common Files\Microsoft Shared\Ink\TabTip.exe";
      QProcess process = mKeyboardProcess->start(keyboardProgram, QStringList() << keyboardFolder);

      Hide the keyboard:
      HWND wKB = ::FindWindow(_TEXT("IPTip_Main_Window"), NULL);
      if (wKB != NULL && ::IsWindowVisible(wKB))
      {
      if (!::PostMessage(wKB, WM_SYSCOMMAND, SC_CLOSE, 0))
      {
      int error = ::GetLastError();
      LogError("Failed to hide touch keyboard error code: " + std::to_string(error), UTIL);
      }
      }

      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