显示 Windows 触摸键盘 [英] Display Windows Touch Keyboard

查看:35
本文介绍了显示 Windows 触摸键盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用 Qt 和 Qml 为 Windows 8 编写一个应用程序.当我将焦点设置到文本输入字段(例如搜索框)时,我希望出现触摸键盘.诸如 textInput.openSoftwareInputPanel(); 之类的东西不适用于桌面应用程序.Windows 8 有一个默认的触摸键盘,可以显示这个键盘.我找不到这个问题的任何解决方案.有人可以帮我吗?

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?

推荐答案

好的,我已经解决了这个问题:

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

我可以在外部进程中调用 osk 键盘.使用我的 textInput 字段的信号/插槽,我调用了一个启动此过程的函数.

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.

感谢您的帮助.

这篇关于显示 Windows 触摸键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆