Qt Virtual Keyboard

Qt Virtual Keyboard 项目为 Linux 桌面/X11、Windows 桌面和 Boot2Qt 目标机上的 Qt 6 提供了输入框架和参考键盘前端。

通过输入框架,可以轻松编写自定义输入法或集成第三方输入引擎。输入法可以用 C++ 或 QML 实现。

使用模块

使用 Qt 模块的 C++ API 需要直接或通过其他依赖关系与模块库链接。有几种构建工具为此提供了专门支持,包括CMakeqmake

使用 CMake 构建

使用find_package() 命令在Qt6 软件包中找到所需的模块组件:

find_package(Qt6 REQUIRED COMPONENTS VirtualKeyboard)
target_link_libraries(mytarget PRIVATE Qt6::VirtualKeyboard)

更多详情,请参阅使用 CMake 构建概述。

使用 qmake 构建

要配置使用 qmake 构建的模块,请在项目的 .pro 文件中添加该模块作为QT 变量的值:

QT += virtualkeyboard

文章和指南

实例

参考资料

许可证和归属

Qt Virtual Keyboard QML 是根据Qt 公司的商业许可证提供的。此外,它还受GNU 通用公共许可证第 3 版的保护。详情请参见Qt Licensing

此外,Qt Virtual Keyboard 可能包含以下许可下的第三方模块:

OpenWnn

阿帕奇许可证 2.0

PinyinIME

阿帕奇许可证 2.0

Traditional Chinese IME (tcime)

Apache 许可证 2.0 和 BSD 3-条款 "新 "或 "修订 "许可证

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.