如何在Qt上显示键盘? [英] How to show the keyboard on Qt?

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

问题描述

关于将焦点放在文本框上时如何显示键盘的任何想法吗?就像需要时自动出现的android键盘一样.如何在qt上做?

Any idea on how to show the keyboard when the focus is on a textbox? Just like android keyboard that is automatically appears when it is necessary. How can I do it on qt?

谢谢!

推荐答案

如果您使用QML,则需要调用

If you use QML you need invoke

Qt.inputMethod.show();

如果使用纯C ++编程,则需要在同一类QInputMethod中使用show()方法.

If you programming in pure C++ you need use method show() in same class QInputMethod.

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

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