Display Windows Touch Keyboard

2019-06-09 00:32发布

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条回答
时光不老,我们不散
2楼-- · 2019-06-09 01:03

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.

查看更多
登录 后发表回答