QVirtualKeyboardDictionary Class
用于虚拟键盘输入法的应用程序自定义词典。更多...
| 标题: | #include <QVirtualKeyboardDictionary> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS VirtualKeyboard) target_link_libraries(mytarget PRIVATE Qt6::VirtualKeyboard) |
| qmake: | QT += virtualkeyboard |
| 继承自: | QObject |
属性
公共函数
| QStringList | contents() const |
| QString | name() const |
| void | resetContents() |
| void | setContents(const QStringList &contents) |
信号
| void | contentsChanged() |
属性文档
contents : QStringList
词典的内容。
该属性存储词典的内容。通常,内容由单词或短语组成。请注意,词典是语言中立的,这意味着如果词典包含与语言相关的数据,则由应用程序负责对其进行本地化。
内容可在任何时候设置,但建议在输入法未处于活动状态时进行设置。
访问函数:
| QStringList | contents() const |
| void | setContents(const QStringList &contents) |
| void | resetContents() |
通知器信号:
| void | contentsChanged() |
[read-only] name : const QString
词典的名称。
该属性保存了创建词典时指定的词典名称。当需要引用特定词典时(例如在输入上下文中激活该词典时),该名称必不可少。
注意:词典名称 无法在后续修改。
访问函数:
| QString | name() const |
© 2026 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.