Display Windows Touch Keyboard

狂风中的少年 提交于 2019-12-23 03:39:11

问题


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:


Ok i have solved the problem, with:

QProcess *process = new QProcess(this);
    QString program = "explorer.exe";
    QString folder = "C:\\Windows\\System32\\osk.exe";
    process->start(program, QStringList() << folder);

i can call the osk keyboard in an external process. With a signal/ slot to my textInput field i call a function who start this process.

Thank you for help.



来源:https://stackoverflow.com/questions/20972875/display-windows-touch-keyboard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!