Important: Please read the Qt Code of Conduct -

Display Windows Touch Keyboard

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

  • 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);

Log in to reply